RTLTMPro icon indicating copy to clipboard operation
RTLTMPro copied to clipboard

Mixed English-Arabic text with rich tags place space in wrong position

Open sonya-wins opened this issue 1 year ago • 0 comments

If you have rich text tags like in mixed English-Arabic text, the spaces around the the English and the tags can get associated with the wrong word and placed in the wrong location. This happens when the tags are next to the English words.

If you had the input like: Arabicapple <b>Englishbanana</b> Arabiccarrot expected rendering: Arabiccarrot Englishbanana Arabicapple actual: Arabiccarrot EnglishbananAarabicapple

Example of a bold tag following English words mid sentence. The space gets placed in the wrong spot leaving no space on one side and double space on the other. image

Moving the space after the bold tag places it in the correct space - this is unusual placement for tags and is surprising behaviour. image

sonya-wins avatar May 23 '24 23:05 sonya-wins