Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Martin Schultz on September 18, 2012, 06:24:11 AM

Title: Font created -> text rendering mixed up
Post by: Martin Schultz on September 18, 2012, 06:24:11 AM
Hi. I'm having an issue with importing my own font and I can't get rid of the feeling it's something very simple stupid, but I can't find it.

I have a font exported as .txt (EZ Gui format) from Glyph Designer. Now in Unity I created a blank atlas. Then I used the FontMaker to import the font using the newly created Atlas (I want to have the same kind of texture atlas as with the supplied scifi-font header font). After that, I created a prefab with UI Font on it and selected the atlas / font sprite. Then I assign that font prefab to the UILabel. If I enter any text, the rendering of the text gets mixed up like shown in the screenshot. If I assign to the UILabel the original scifi-header font, it works.

I checked also the material, it's a unlit/transparent colored. Even an A/B comparison between the scifi font and mine didn't show any difference. There must be something obvious I'm doing wrong. Any clue?

Thanks
Martin

(http://www.decane.net/external/unity/ngui/font1.png)

(http://www.decane.net/external/unity/ngui/font2.png)

(http://www.decane.net/external/unity/ngui/font3.png)

(http://www.decane.net/external/unity/ngui/font4.png)

(http://www.decane.net/external/unity/ngui/font5.png)
Title: Re: Font created -> text rendering mixed up
Post by: PhilipC on September 18, 2012, 01:32:04 PM
Right now your building the font into an atlas. What happens if you try to use the font not in a atlas? (maybe some step is being missed when you use the atlas). I'm not 100% sure what could be going wrong though.
Title: Re: Font created -> text rendering mixed up
Post by: Martin Schultz on September 19, 2012, 03:58:02 AM
[EDIT]

Solved it! It was the import settings accidentially scaled down from 1024 to 512 and that mixed up the whole font setup!

The Z issue I had was that 2 different atlasses where used on top of each other with UI elements and that didn't work. Had to put them into 1 atlas to have the z sorting work correctly with ui elements.