Font.GetCharacterInfo bug in WP8 Win8 for non-latin character

Recently when I use NGUI with Unity 4.2, I found non-latin character (like Chinese or Russian) cannot be displayed in UILabel on WP8 and Win8 build. After further debugging, I found Font.GetCharacterInfo always return false for non-latin characters although they are already in font texture. The repro is very simple, just put a UILabel with non-latin character, deploy the build to a Win8 or WP8 device and the character won’t show up.

With Font.characterInfo, I am able to workaround this bug by re-implement Font.GetCharacterInfo. However, it will be great if Unity can confirm it’s a bug for WP8 and Win8 platforms and get it fixed soon.

Hello,

it is indeed a known bug.

Will this issue be fixed with Unity 4.3 release?

Yes.

Thanks for the confirmation. It’s awesome. Looking forward to it.

I can’t get it to work. It always returns false on the ‘a’ character???

char A = ‘a’;
Debug.Log(style.font.GetCharacterInfo(A, out info));

What Unity version are you using?

4.5.3f3

I worked around my problem. dont have to get down to the dirty level yet.

@Helical Maybe you could give us a clue as to how you worked around the problem?

Well originally I needed to know the size of the text in order to set the bounding box around it. well there is an article I found http://docs.unity3d.com/Manual/HOWTO-UIFitContentSize.html that helped me with my problem.

For another problem I wanted to have text being typed it by a script already in its best fit. But to know the best fit of a string inside a given bounding box you could use text.cachedTextGenerator.fontSizeUsedForBestFit But I believe you need to give it an Update or something to calculate, as I’m not sure it happenes immediately every time the text changes.

For the life of me, I tried to get the low level information about fonts but couldn’t. Just gonna have to work around font issues is all I’m saying.