-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
There are a number of issues with the rendering of bi-directional text in RTL languages. These issues can cause text to be displayed incorrectly, making it difficult or impossible to read.
Some of the most common issues include:
- Text being displayed in the wrong order, from left to right instead of right to left.
- Text being displayed overlapping.
- Text being displayed with incorrect spacing.
- Text being displayed with incorrect kerning.
Issue description
As an example, when you compile the latest version of the repo in Persian, this is your first page like that:
It seems right for someone who doesn't know RTl languages; however, if you are learning in your native language, it can be confusing.
this is how must be rendered in RTl languages:
Proposed solving way for Solving Bi-directional issue
Why not directly fix in mdbook?
My first step was to check out the Contributing to MDBook document before I started a github issue here
The current PR backlog is beyond what we can process at this time. Only issues that have an E-Help-wanted or Feature accepted label will likely receive reviews.
mdBook/CONTRIBUTING.md
As far as I can tell, supporting BiDi is not a priority for them at the moment
My Proposed method:
The way I fix the bi-di issue with the html tags is to add dir="auto" html attribute just after rendering by js and add "unicode-bidi:embed;" to those classes.
Refrences:
#671
mdBook issue#1486 Support for Right to Left