Description
When writing Persian (RTL) text in MarkText, the editor renders the layout and text direction correctly (right-aligned text, proper word ordering). However, when exporting the document to PDF (File -> Export -> PDF), the RTL styling and alignment are completely lost. The text in the PDF becomes left-aligned (LTR), list bullet points move to the left, and sentences with mixed LTR/RTL words (e.g., English words inside Persian text) suffer from scrambled and reversed word order.
Steps to Reproduce
- Set the editor text direction to Right-to-Left (or write RTL Persian text).
- Write a paragraph with mixed Persian and English text (e.g.,
تست راست به چپ در pdf مشکل دارد).
- Observe that it aligns and orders correctly in the editor view (aligned to the right).
- Go to
File -> Export -> PDF.
- Open the exported PDF file.
Expected Behavior
The exported PDF should preserve the RTL alignment, list structures, and correct text ordering just as displayed in the editor.
Actual Behavior
The PDF renders all text as Left-to-Right (LTR). Text is left-aligned, bullet points are placed on the left, and mixed-language sentences have their word order reversed. For example:
تست راست به چپ در pdf مشکل دارد
renders incorrectly as:
مشکل دارد pdf تست راست به چپ در
Screenshots / Logs
Operating System
Windows
MarkText Version
v0.20.0-beta.5
OS Version
Windows 11
Reproducibility
Description
When writing Persian (RTL) text in MarkText, the editor renders the layout and text direction correctly (right-aligned text, proper word ordering). However, when exporting the document to PDF (File -> Export -> PDF), the RTL styling and alignment are completely lost. The text in the PDF becomes left-aligned (LTR), list bullet points move to the left, and sentences with mixed LTR/RTL words (e.g., English words inside Persian text) suffer from scrambled and reversed word order.
Steps to Reproduce
تست راست به چپ در pdf مشکل دارد).File->Export->PDF.Expected Behavior
The exported PDF should preserve the RTL alignment, list structures, and correct text ordering just as displayed in the editor.
Actual Behavior
The PDF renders all text as Left-to-Right (LTR). Text is left-aligned, bullet points are placed on the left, and mixed-language sentences have their word order reversed. For example:
تست راست به چپ در pdf مشکل داردrenders incorrectly as:
مشکل دارد pdf تست راست به چپ درScreenshots / Logs
Operating System
Windows
MarkText Version
v0.20.0-beta.5
OS Version
Windows 11
Reproducibility