It's definitely not possible to mix left and right aligned text lines, without knowing the width of all the text lines, otherwise the rightmost pixel position is unknown, which is needed to right align to the longest (RTL) text line. It can also occur due to composed characters/grapheme clusters, which need to be displayed together, such as the "COMBINING DOUBLE TILDE" which connects two characters with an overarching tilde.Ī possible solution would be to draw such overlong text lines left aligned, but still keep the RTL order of the characters/glyphs, the same way that RTL text behaves and line wraps inside of an LTR container (div or p in HTML). Overlong text lines can occur due to variable-width characters, that are unavoidable with Unicode, even for mono-spaced fonts (e.g., "double width" Chinese characters). This would cause problems for scrolling, since there is no clear start at the left side anymore. A problem would still occur with overlong lines, which would be overlong on the left side, for RTL text. Each paragraph would also line wrap independently. Therefore properly handling RTL text would also mean that the hexpair/byte display would need to be shown from right to left as well.Įssentially, LTR and RTL text would need to be split up into individual paragraphs that are also edited individually. So both, LTR and RTL text are in the right logical order in a file, they just map too a LTR coordinate system or an RTL coordinate system which have opposing directions for the x axis. So while increasing file offsets for LTR text mean increasing horizontal pixel offsets, for RTL text, increasing file offsets mean increasing horizontal pixel offsets from right to left (or decreasing when assuming a LTR coordinate system). ![]() The logical order of characters in a file is displayed as left to right in a hex editor, also for RTL text.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |