Support => NGUI 3 Support => Topic started by: Pasty on September 11, 2014, 02:53:48 PM
Title: Dynamic Fonts in Flash
Post by: Pasty on September 11, 2014, 02:53:48 PM
It seems that dynamic fonts are working in Flash player builds in Unity 4.5.3. Are there any plans to add support for this with NGUI?
Title: Re: Dynamic Fonts in Flash
Post by: ArenMook on September 12, 2014, 04:05:04 AM
It's just a simple matter of changing a few #ifs. I'll see about doing that for the next update.
Title: Re: Dynamic Fonts in Flash
Post by: Pasty on September 15, 2014, 02:41:57 PM
I looked into it myself and did the following:
removed #if !UNITY_FLASH wherever it preceded #define DYNAMIC_FONT (7 files) UIFont.cs - replaced fontNames[] usage (No support in UnityEngine) UILabel.cs - replaced use of '++usage' with sepeate line for incrementing UILabel.cs - created custom LastIndexOfAny() and IndexOfAny() methods to replace incompatible ones UIWidget.cs - switched to if (!(mOnRender == value)) since Flash doesn't support .Equals()
Seems OK now!
Title: Re: Dynamic Fonts in Flash
Post by: sluice on September 16, 2014, 02:08:53 PM
Also, had this issue. You both pointed me in the right direction but I still had to fiddle around... Here's how to fix it, more precisly: :D