Author Topic: chinese font not working in latest version of NGUI  (Read 4503 times)

daylightEdward

  • Guest
chinese font not working in latest version of NGUI
« 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!".

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: chinese font not working in latest version of NGUI
« Reply #1 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.

daylightEdward

  • Guest
Re: chinese font not working in latest version of NGUI
« Reply #2 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: chinese font not working in latest version of NGUI
« Reply #3 on: August 02, 2013, 11:43:46 PM »
NGUI folder contains a readme file that has a version number inside.

daylightEdward

  • Guest
Re: chinese font not working in latest version of NGUI
« Reply #4 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: chinese font not working in latest version of NGUI
« Reply #5 on: August 05, 2013, 08:21:28 AM »
Is the actual TTF included? Because that's all you need.

daylightEdward

  • Guest
Re: chinese font not working in latest version of NGUI
« Reply #6 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)
« Last Edit: August 05, 2013, 09:57:44 PM by daylightEd »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: chinese font not working in latest version of NGUI
« Reply #7 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.

galuodo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 65
    • View Profile
Re: chinese font not working in latest version of NGUI
« Reply #8 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