Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: daylightEdward on July 31, 2013, 11:58:34 PM

Title: chinese font not working in latest version of NGUI
Post by: daylightEdward on July 31, 2013, 11:58:34 PM
Hi, I have recently update my NGUI to the latest version and the chinese font that I'm using can no longer work. The error says "attempting to print using an invalid font!".
Title: Re: chinese font not working in latest version of NGUI
Post by: ArenMook on August 01, 2013, 05:57:47 PM
The more information you provide the better. What version did you have? Which version did you update to? Did you follow update process? Did you try re-creating your font?

No information means I can't help you.
Title: Re: chinese font not working in latest version of NGUI
Post by: daylightEdward on August 02, 2013, 10:44:46 PM
Hi Aren, I updated using the link that you guys gave me, since it is always pointing to the latest version. How do I know which version am I using? Is there a way. I got my font in form of unity package I have tried reimporting them, I will try recreating it. Thanks!
Title: Re: chinese font not working in latest version of NGUI
Post by: ArenMook on August 02, 2013, 11:43:46 PM
NGUI folder contains a readme file that has a version number inside.
Title: Re: chinese font not working in latest version of NGUI
Post by: daylightEdward on August 04, 2013, 09:55:25 PM
Hi Aren, I have updated from NGUi 2.3.4 to 2.6.3. the chinese font that I'm using is called 3500Font, I got the unity package from another forum and the text asset is not included in the package so I don't think I can re-create it using font maker in NGUI. Hope you could help me out, thanks!
Title: Re: chinese font not working in latest version of NGUI
Post by: ArenMook on August 05, 2013, 08:21:28 AM
Is the actual TTF included? Because that's all you need.
Title: Re: chinese font not working in latest version of NGUI
Post by: daylightEdward on August 05, 2013, 09:40:30 PM
Hi Aren,
    Unfortunately, they did not include the TTF files inside, they only include the material, prefab and the png image for the font atlas. I realized that they also include the UIFont.cs for the NGUI. The error is as follows:

Attempting to print using an invalid font!
UnityEngine.Debug:LogError(Object)
UIFont:Print(String, Color32, BetterList`1, BetterList`1, BetterList`1, Boolean, SymbolStyle, Alignment, Int32, Boolean) (at Assets/NGUI/Scripts/UI/UIFont.cs:1095)
UILabel:OnFill(BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/UI/UILabel.cs:643)
UIWidget:UpdateGeometry(UIPanel, Boolean) (at Assets/NGUI/Scripts/Internal/UIWidget.cs:711)
UIPanel:LateUpdate() (at Assets/NGUI/Scripts/UI/UIPanel.cs:1074)
Title: Re: chinese font not working in latest version of NGUI
Post by: ArenMook on August 05, 2013, 10:59:01 PM
I really can't help you much here, especially considering that UIFont changed quite a bit from 2.3.4 to 2.6.3. If they have their own custom version, then it's simply not compatible to begin with.

You need the original TTF in order to re-create the font.
Title: Re: chinese font not working in latest version of NGUI
Post by: galuodo on August 07, 2013, 10:37:33 AM
I've tried to update from 2.1 to 2.5.1 with the same bitmap font, and I did not find any problems, and if you used the dynamic font, you probably need to reimport a new font