Font Fallback - Text Attributes not updated

Hi Stephan,
Apologies if I’ve missed a thread that discusses this … but I did look.
Running 2018.1.7.

I have a font with multiple fallback fonts to support localization.
If I dynamically change the font color/text alignment etc when using a fallback font the text does not change.
If the font being used doesn’t use the fallback font, no TMP SubMeshUI are allocated, everything works fine.

3784192--317128--upload_2018-10-15_11-3-10.png

If I dynamically change alignment from center to left then apply strikethrough, the strikethrough mark appears to the left, however the text remains centered…

Any ideas?

Can you provide an example (script) of how are you changing the color or alignment?

Stephan,
I simply have a reference to the TextMeshProUGUI and set the color e.g. m_text.color = Control.darkColor2;

This can also be done by simply changing the values whilst running with the same effect i.e. doesn’t work for text that is using fallback font.

If my text includes characters from both the primary font and also from the fallback font, the characters from the primary font change color but those from the fallback font don’t. Same things happens if I change alignment, only the primary font characters change alignment…

Cheers

I just tested both changing alignment and vertex color and that appears to be working fine.

However, changing the faceColor of the material of the primary as opposed to the vertex color (via the .color property) would produce the behavior you describe. In such case (assuming you can use vertex color) you would have to manually sync up the faceColor of the shared material of the submesh objects.

P.S. Automatic syncing of sub object material properties with the primary is something that I could look into in the future although not trivial to handle given the text object has no way of knowing that some script is modifying its material.

Stephan,
Perhaps should have done some more testing… yes this works fine :slight_smile:

However, if I also use a 3rd party asset CurvedUI (Curved UI - VR Ready Solution To Bend / Warp Your Canvas! | GUI Tools | Unity Asset Store) on my canvas then it produces the effects I described earlier.

Removing this asset from my canvas fixes the issue.

Cheers.

Since there is some magic happening behind the scene when using fallbacks, I am not surprised that it is tripping up other assets. I would suggest reaching out to the author of Curved UI (who has always been very responsive to users) and see if he might be able to provide an update for those scenarios.

Will do!