Some characters in:
[hebrew.pdf](https://github.com/mozilla/pdf.js/files/5869562/hebrew.pdf)
are not correct in the text layer (such as question marks).

We get text direction in `evaluator.js` but we don't use it.
It was used in the past, but it seems it has been removed:
https://github.com/mozilla/pdf.js/commit/5bd8a83c9bd7c23003b09e1cfd71422c6b083826#diff-579f2fb8055052aa97906d5fc75aeee84aa7dd9f8efcca24d8a5460d828e1de8L170

return this._capability.promise;
    },
    cancel: function TextLayer_cancel() {
      this._canceled = true;
      if (this._reader) {
        this._reader.cancel(new AbortException("TextLayer task cancelled."));
        this._reader = null;
      }
      if (this._renderTimer !== null) {
        clearTimeout(this._renderTimer);
        this._renderTimer = null;
      }
      this._capability.reject(new Error("TextLayer task cancelled."));
    },
    _processItems(items, styleCache) {
      for (let i = 0, len = items.length; i < len; i++) {
        this._textContentItemsStr.push(items[i].str);
        appendText(this, items[i], styleCache);
      }
    },
    _layoutText(textDiv) {