Author Topic: Dynamic fonts don't seem to work for me in 2.6.3 anymore.  (Read 3806 times)

FrankSpil

  • Guest
Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« on: July 01, 2013, 08:43:09 AM »
Hi, I have a strange issue with the latest 2.6.3 release with dynamic fonts.
I always get the following error: "Attempting to print using an invalid font!"
I didn't get this error in 2.6.1, it was/is working fine in that version. ???
I tried to test with just one simple label and also that is not working.

- The TTF font we're using is: "Berlin Sans FB Demi", with the following import options:
Font Size: 1
Color: White
Rendering Mode: Smooth
Character: Dynamic
Incl. Font Data:YES
Font Names: Berlin Sans FB Demi

- The font prefab is created using the NGUI Font Maker using the following settings:
Type: Dynamic
Font TTF: BerlinDemiBold
Font Size: 16 NORMAL (Bold also doesn't make a difference here for me)
Font Name: BerlinDemiBold16

- The generated font prefab has the following data:
Font Type: Dynamic
TTF Font: BerlinDemiBold
Size: 20
Material: Font Material (Linking to the material under the actual imported TTF font, so that seems fine)
Spacing: 0,0
Pixel Size: 1

- The label was created using the widget tool with the dynamic font prefab selected.

- When I try to enter text in the label I get the error: "Attempting to print using an invalid font!", I also get this error on runtime. I noticed that the font material is completely empty, in 2.6.1 I could see characters in this material.

Can anyone confirm this issue, or have a solution for it? :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« Reply #1 on: July 01, 2013, 11:42:42 PM »
Seems to work just fine here. What version of Unity?

FrankSpil

  • Guest
Re: Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« Reply #2 on: July 02, 2013, 04:30:21 AM »
We're using Unity Version 4.1.5f1 (ed5ea3281df6) on Win7 sp1 64bit...

I still haven't found a solution for the problem, for now I'll keep using NGUI 2.6.1. :-\

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« Reply #3 on: July 02, 2013, 10:23:27 AM »
1. Opened Font Maker
2. Dynamic type
3. Font TTF: Arial
4. Size: 24, bold
5. Create Font (saved name: Arial)
6. New Scene
7. ALT+SHIFT+L
8. Chose the new Arial font. No errors.

FrankSpil

  • Guest
Re: Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« Reply #4 on: July 03, 2013, 04:08:57 AM »
I did exactly the same and got the same error again.
But I found the problem, we're using the flash platform, we found this define which is added in NGUI 2.6.3:

#if !UNITY_3_5 && !UNITY_FLASH
#define DYNAMIC_FONT
#endif

So that was preventing the dynamic fonts to work in NGUI 2.6.3...
Is there a reason why dynamic fonts are disabled for flash now? It was working fine in flash before actually. :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamic fonts don't seem to work for me in 2.6.3 anymore.
« Reply #5 on: July 03, 2013, 04:14:52 AM »
It was? o_O I commented it out because I was pretty certain it wasn't working in Flash.