Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: FrankSpil 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? :)
-
Seems to work just fine here. What version of Unity?
-
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. :-\
-
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.
-
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. :)
-
It was? o_O I commented it out because I was pretty certain it wasn't working in Flash.