Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: mindlube on October 29, 2013, 11:33:02 AM

Title: 3.0.3: UIFont is now obsolete for dynamic fonts?
Post by: mindlube on October 29, 2013, 11:33:02 AM
Now in the new regime, with each label having a reference to a .TTF file, how would one change the font for all labels, or some subset of labels, in the game? I don't understand why UILabel now points directly to a TTF file. The usability is actually degraded- in my opinion:

Previous to 3.0.3 I was using dynamic fonts with UIFont- and I could swap out fonts for all my labels but just changing the .TTF file used by the UIFont instance. For example I have UIFonts named SansSerif and TitleSerif , and I've been experimenting with different fonts in my design.

But now UILabel doesn't accept a UIFont for dynamic label. I just tried swapping out a font by quitting Unity and replacing the .TTF file with another font, by naming it the same filename, e.g. MyTitleSerif.ttf, then re-launching Unity, and my UILabel doesnt display any characters, even though the UILabel thinks it's still connected to MyTitleSerif.ttf

Unless I am misunderstanding, it seems like it's going to be extremely painful to change dynamic fonts source .ttf files

edit: afterthought:  now that multi-editing of Labels is supported, it's really not that big a deal, to swap in a new font!  :-X
Title: Re: 3.0.3: UIFont is now obsolete for dynamic fonts?
Post by: ArenMook on October 29, 2013, 04:18:48 PM
And you still can do just that. Right click on the TTF file, show in explorer, replace the font with another one using the same name. Tab back to Unity, voila.
Title: Re: 3.0.3: UIFont is now obsolete for dynamic fonts?
Post by: mindlube on October 29, 2013, 05:21:45 PM
Thanks Aren- I tried that and ended up with blank labels at first. They did update after that though... maybe there was just a delay.

Also I just noticed that the Widget Wizard still expects to use UIFont.. maybe it needs to be updated to the new regime?
Title: Re: 3.0.3: UIFont is now obsolete for dynamic fonts?
Post by: ArenMook on October 30, 2013, 03:10:57 AM
Yeah, I haven't had a chance to update it yet.