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

start: boundary.y2,
          end: horizon[j].end,
          boundary: horizon[j].boundary,
        });
      }
      
      
      
      for (q = i; q <= j; q++) {
        horizonPart = horizon[q];
        affectedBoundary = horizonPart.boundary;
        if (affectedBoundary.x2New !== undefined) {
          continue;
        }
        let used = false;
        for (
          k = i - 1;
          !used && k >= 0 && horizon[k].start >= affectedBoundary.y1;
          k--
        ) {
          used = horizon[k].boundary === affectedBoundary;
        }
        for (
          k = j + 1;
          !used && k < horizon.length && horizon[k].end <= affectedBoundary.y2;
          k++
        ) {
          used = horizon[k].boundary === affectedBoundary;
        }
        for (k = 0; !used && k < changedHorizon.length; k++) {