RTL Arabic problems with rich text

1 year 1 day ago #4030 by nzgreg
hey Frank,

we're having problems with RTL / Arabic and rich text. It looks like rich text is being reversed when it shouldn't before being applied to a Text Mesh Pro field. We're seeing problems with normal data that has been imported via csv, and trying to use things like prefixes, eg. adding a <sprite name="xxx"> in a prefix doesn't work.

Are you aware of problems like this with the current version v2.8.13f2 and are any fixes being worked on? We've been trying to swap the character ordering depending on LocalizationManager.IsRight2Left etc. but it's whack-a-mole, one problem gets fixed and just shifts problems to another method further down the chain.

Thanks for any info.


// greg

Please Log in or Create an account to join the conversation.

11 months 3 weeks ago - 11 months 3 weeks ago #4039 by nzgreg
Update: We have tested replacing the I2 Arabic fixer (looks like it was based on https://github.com/Konash/arabic-support-unity ) with methods from https://github.com/mnarimani/RTLTMPro .

The glyphs have slightly better rendering in some cases, some things like text containing paragraphs with \n etc. render in the expected order instead of being fully reversed, and some rich text is preserved instead of being reversed in body copy.

We also added some fixes for using rich text in prefixes and suffixes in the Localize component.

We are still hitting some strange errors like the first time a scene is entered the TextMesh Pro fields are changing from left-aligned to right-aligned in Arabic as expected, but the next time the scene is entered they do not change alignment. I think we are probably hitting an Awake/Start race somewhere with the language selection and I2 checking the language and saving/updating the original and intended alignment of textfields.
Last edit: 11 months 3 weeks ago by nzgreg. Reason: working around spam protection
The following user(s) said Thank You: UltraRat

Please Log in or Create an account to join the conversation.

1 month 4 days ago #4193 by UltraRat
We also just started hitting this problem. So +1 that it should be fixed in I2.

In the end did you have to grab most of RTLTMPro and replacing everything or was it fairly isolated to RichTextFixer?

Please Log in or Create an account to join the conversation.

1 month 2 days ago #4194 by nzgreg
At the moment we are using a few mods to I2 in some places, eg. fixing the handling of prefixes and suffixes on localised text, and we are using the 'fixer' call of RTLTMPro instead of the I2 one to handle reversing and glyph adjusting the final text being applied to TMPro fields.

We also have an editor script to reset the language when stopping else the editor gets confused about language and text field alignment which starts messing things up.

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Template by JoomlaShine