Attach (recommended) or Link to PDF file here:
[mytestfile.pdf](https://github.com/mozilla/pdf.js/files/7190033/mytestfile.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: linux debian

Steps to reproduce the problem:
1. Open the pdf  
2. Click on the yellow area

What is the expected behavior? (add screenshot)
The text layout should be RTL.

What went wrong? (add screenshot)
The text layout is LTR.

It works correctly in evince and in acrobat.
I added a `dir="rtl"` on the `p` element in using devtools and the rendering is the same as in acrobat.

"(Lorem ipsum dolor sit amet, consectetur adipiscing elit.) Tj\n" +
        "0.00 -5.00 Td " +
        "(Aliquam vitae felis ac lectus bibendum ultricies quis non) Tj\n" +
        "0.00 -5.00 Td " +
        "( diam.) Tj\n" +
        "0.00 -5.00 Td " +
        "(Morbi id porttitor quam, a iaculis dui.) Tj\n" +
        "0.00 -5.00 Td " +
        "(Pellentesque habitant morbi tristique senectus et netus ) Tj\n" +
        "0.00 -5.00 Td " +
        "(et malesuada fames ac turpis egestas.) Tj\n" +
        "0.00 -5.00 Td () Tj\n" +
        "0.00 -5.00 Td () Tj\n" +
        "0.00 -5.00 Td " +
        "(Nulla consectetur, ligula in tincidunt placerat, velit ) Tj\n" +
        "0.00 -5.00 Td " +
        "(augue consectetur orci, sed mattis libero nunc ut massa.) Tj\n" +
        "0.00 -5.00 Td " +
        "(Etiam facilisis tempus interdum.) Tj ET Q EMC";
      const annotation = await AnnotationFactory.create(
        xref,
        textWidgetRef,
        pdfManagerMock,
        idFactoryMock
      
      const annotationStorage = new Map(
      annotationStorage.set(annotation.data.id, {
        value:
          "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\r" +
          "Aliquam vitae felis ac lectus bibendum ultricies quis non diam.\n" +