Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: DrLoomis on October 24, 2012, 05:20:43 PM
-
For some reason, when I apply a color to a font used in a label (either by using the Color Tint selector or [FF0000] encoding), the encoding only shows up very faintly, as an outline color around the edge of the font. It's so faint that I wouldn't have even noticed without looking really, really closely.
The font itself otherwise works fine. It's readable in-game, the label works properly, everything's in a shared atlas, encoding is checked on the label, and so on.
The only issue is that color overlays don't work. Does anyone have any idea what I'm doing incorrectly?
-
P.S. In case it matters, I created and exported the font from GlyphDesigner.
-
What color is the base font? If it's black, you aren't going to get any color tinting.
-
Yeah, it was originally black. I tried changing it to white when exporting from GlyphDesigner, but couldn't seem to get it to import correctly (I'm guessing b/c it comes out as just a white square, which all gets stripped as alpha on import).
Is there a special trick for importing a white font?
-
No, the font is always white by default. Sounds like you didn't export it correctly. Try consulting the Glyph Designer manual if there is one, or asking on their support forums.
-
Just wanted to follow up in case this helps anyone else. My problem was that I was exporting from GlyphDesigner with black text on a white background. To get font coloring to work the font needs to be white, as ArenMook said, but the important thing is that you set the background to be black. I was exporting white-on-white, which confused NGUI on import b/c there was no detail at all in the texture. If you export w/ a black background, NGUI is able to properly recognize the characters and thus do color tinting, etc.
-
NGUI doesn't recognize anything. Only what you save into the Alpha channel matters. I always have pure white in RGB, and only the Alpha channel contains the glyphs.
-
Sorry, maybe I used the wrong terminology. Maybe it's in how GlyphDesigner exports the data, as opposed to what NGUI recognizes, but all I meant was that exporting white-on-white resulted in a texture that, somewhere in the chain, was tagged as either all alpha or no alpha since there was no detail; it was just a white square.
Hell, maybe I'm still explaining it incorrectly, so the only thing that matters is this: when exporting from GlyphDesigner set your text color to white and the background to black. That works.