Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: filippopotamus on October 03, 2012, 04:35:58 PM
-
My fonts seem to be getting artifacts and I am not sure why. I scaled on a lot just to show the artifacts better:
(http://i.imgur.com/5nSbQ.png)
Any thoughts? Fonts were created using GlyphDesigner
-
Are the artifacts visible on the png you create with GlyphDesigner, or do they show up only after using the font in NGUI? If they're not visible after GlyphDesign export, check the the NGUI-atlas you imported the font into. To me it looks like it might be GlyphDesigner -issue, but hard to say before you check those details.
-
I looked at the exported bitmap from GlyphDesigner and it looked perfectly fine.
I went ahead and added 1 pixel of spacing for each Glyph and then re-exported. That seemed to have fixed it for this font. I will do the others and report back.
Thanks for the help! :)
-
Yup. That did it. Adding 1 pixel of spacing in GlyphDesigner did the trick. It is worth nothing however, that GlyphDesigner did not export the artifacts. It seems that NGUI was getting a little bit of the adjacent letters.
-
I find that happens most often in the game view if it's not displaying 1:1 pixel size.
ie. My game window is running 1536*2048 (iPad3) yet the game window is scaled to 686*915 (Screen not big enough to be full res) and the font has the rendering issue. As soon as I run it on the decide there is no issue.
-
It is entirely possible that this issue does not happen on the device for me either. Thanks for that observation.
-
It's how texture filtering works. When the pixel size of the texture is bigger than the pixel of the screen, neighbour pixels get sampled to "fill the gap". Adding some padding is indeed the right way, and is something BMFont does by default.