PDA

View Full Version : Bitmap font



Questions Burner
11-15-2001, 11:56 PM
How to create bitmap font that has no background, I don't want to have my fonts inside rectangles.

xill
11-16-2001, 03:32 AM
Check nehe.gamedev.net tutorial 20, about masking, you can also mask your font that way..

gl http://www.opengl.org/discussion_boards/ubb/biggrin.gif

jabe
11-16-2001, 07:44 AM
whereever a bit is not set is no pixel drawn.

rIO
11-16-2001, 08:14 AM
I've done that way :

Pick up the standard font

Choose a MASK color that doesn't appear in your font

Fill the background of the font picture with that color

Read the bitmap and set the alpha value to 0 when you find the MASK color.

Render with GL_SRC_ALPHA,GL_ONE_MUS_SRC_ALPA

Have fun...

(The better looking way is to use your hown format for fotn picture including the alpha channell in the font bitmap, this means doing two bitmap pictures or write a simple tool that creates a picture with alpha in some way)

rIO.sK