Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: JACLEMGO on June 26, 2014, 02:48:47 AM

Title: Lag on Ipad due to font.cachefontfortext
Post by: JACLEMGO on June 26, 2014, 02:48:47 AM
Im using the latest version on NGUI for an educational game, so the text on labels changes a lot, I sometimes get a font.cachefontfortext in the profiler of more than a sec, which causes a lag on the ipad2.

Im using a dynamic font

How can I solve this?
Title: Re: Lag on Ipad due to font.cachefontfortext
Post by: ArenMook on June 26, 2014, 11:13:52 AM
Just one "for sure" way: don't use dynamic fonts. There are many issues with dynamic fonts which led to me quietly abandoning feature developments related to using dynamic fonts.

If you absolutely have to use dynamic fonts, be sure to not use the "crisp" setting on labels, and stick to labels using the same size fonts. Ie: if you have 10 labels and they all use a different font size, then you are effectively having to cram 10 times more data into the font's textures.
Title: Re: Lag on Ipad due to font.cachefontfortext
Post by: JACLEMGO on July 01, 2014, 01:20:08 PM
I converted the font to NGUI font, and that solved the issue.
Why is there an option to use Unity font also?
Title: Re: Lag on Ipad due to font.cachefontfortext
Post by: ArenMook on July 02, 2014, 05:07:36 AM
In hopes that Unity will fix the issues with dynamic fonts some day. Perhaps in 4.6...