-
When a single font provided to a Phrase with LayoutProcessor enabled, RTL will be able to work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did some more testing it appears that only the the first ever added font into the selector can be displayed in RTL, if the first added font is a LTR font, then all remaining fonts including RTL font will all be displayed in LTR mode. Suppose we add in fonts into FonSelector in the following order: I do not know if this is how selector should be used, or this is even a bug, if there is a proper way to deal with multi languages please let me know. |
Beta Was this translation helpful? Give feedback.
-
What I realized is that the RTL is actually working but FontSelector will attempt to chunk word because the white space can be rendered with a different font prior to the previously selected font to render the word, so in this case white space can be rendered with the first font and if we're using the second font which is a different language it will actually render that space using the first font which is the first language, result in fragmented chunks that render space using the first language font and words with second language font. One solution to my hacky way of doing this, is to properly detect the language of a given string and use specific font or I could just extend and modify FontSelector to prioritize the previously used font which simply checks if char exist in the prior font used in prior chunks, if they don't exist continue iterating with the existing fonts list. |
Beta Was this translation helpful? Give feedback.
What I realized is that the RTL is actually working but FontSelector will attempt to chunk word because the white space can be rendered with a different font prior to the previously selected font to render the word, so in this case white space can be rendered with the first font and if we're using the second font which is a different language it will actually render that space using the first font which is the first language, result in fragmented chunks that render space using the first language font and words with second language font. One solution to my hacky way of doing this, is to properly detect the language of a given string and use specific font or I could just extend and modify F…