Advertisement

Bitmap Font Generator - colored fonts?

Started by February 04, 2009 03:47 PM
2 comments, last by WitchLord 15 years, 9 months ago
Hi, how can I change the color of the bitmap output? At the Moment, I get white fonts only... Other problem with font smoothing: Why the smoothing-"outline" is grey? When I open the created png with alpha channel in paintshop and add a new layer with a yellow background for example (or when I use this png in my game), then the color changes from white to grey to yellow. With a correct alpha the color should change from white to yellow directly (see images)... http://www.lebostein.de/temp/fontcrea_situation.png http://www.lebostein.de/temp/fontcrea_expected.png Very nice tool! I hope this things are results of wrong appliance only, please help me. Thanks! Lebostein
Simply put, it seems like Bitmap Font Generator doesn't use the alpha channel. Instead, it expects you to use blending to get your text on the screen, hence why the fonts have grey outlines when you change the background. Your best bet, if you want bitmapped fonts that use the alpha channel, is to either set anti-aliasing to "None", or find another tool that uses alpha transparency to give smooth fonts.

EDIT: Oh, and for the different coloured fonts, when you use Bitmap Font Generator, there are a black and a white square near the bottom right of the window. When clicking on either of these, it brings up a colour-picking window. The white square is the foreground colour of the font, while the black square decides the background colour.
Advertisement
Quote: Original post by webwraithor find another tool that uses alpha transparency to give smooth fonts.
Thanks, good idea!
Quote: Original post by webwraith...there are a black and a white square near the bottom right of the window
hmmm, I don't see this squares... in the main window?
PS: I use the version 1.11a...
Hi Lebostein,

the idea is that you should use vertex color to determine the font color at run-time. This will allow you to use different colors at the same time without having to use different font textures.

However, if you really wish to bake the color into the texture directly, then you should set the following export settings:

Bit depth: 32A: glyphR: oneG: oneB: one


This will generate a white texture with the glyphs in the alpha channel. You can then open the texture and change the color of the glyphs in the RGB channels.

Alternatively, if you want the font with outline. You can do the following:

Bit depth: 32A: outlineR: glyphG: glyphB: glyph


This will generate a texture with the glyphs in the RGB channels, and the outline in the alpha channel, thus producing a white font with a black outline. You can change the color of the font by changing the color in the RGB channels.


From your sample image you had configured BMFont to export the texture with the following options:

Bit depth: 32A: glyphR: glyphG: glyphB: glyph


Because of this the antialiased edges become gray, as the color is changing from white to black together with the alpha transparency.


Quote: webraith
Simply put, it seems like Bitmap Font Generator doesn't use the alpha channel. Instead, it expects you to use blending to get your text on the screen, hence why the fonts have grey outlines when you change the background. Your best bet, if you want bitmapped fonts that use the alpha channel, is to either set anti-aliasing to "None", or find another tool that uses alpha transparency to give smooth fonts.

EDIT: Oh, and for the different coloured fonts, when you use Bitmap Font Generator, there are a black and a white square near the bottom right of the window. When clicking on either of these, it brings up a colour-picking window. The white square is the foreground colour of the font, while the black square decides the background colour.


webraith, I think you're talking about a different Bitmap Font Generator. Lebostein is talking about my BMFont that you can find here: Bitmap Font Generator

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement