--> andre krause.

quick'n dirty (meta) bitmap font tutorial

It takes quite a time to figure out how to find, modify and load a cool bitmap font for your opengl game/app. so here are the steps you may follow:
(download bitmap_fonts_tutorial.zip [330kbyte] for offline reading)

part1: bitmap font without alpha-channel:

now you may notice that using this font with glBlendFunc(GL_SRC_ALPHA,GL_ONE) in your opengl application is neat, but not satisfactory because shadows and bevelation does not look as expected. this is because this font has no real alpha channel, like you could store in tga - files. but creating this alpha channel needs some steps, as explained now:

part2: bitmap font with 8bit alpha-channel:


Image 1: make a selection with the "color range" tool


Image 2: drop shadows and let your font glow.


Image 3: one transparent layer with several effects.


Image 4: select the transparency information from layer2.


Image 5: create a new channel (our alpha-channel) and press control-key+right-klick to create the alpha-channel values.


a resulting example font.

download some example_fonts.zip [500kbyte] (they are not really good, just for testing purposes. remember too, that they are with alpha-channel! so you should change in the nehe lesson the blending mode to glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) )


download sample source code lesson17_alpha_fonts.zip [200kbyte]