Fonts in opengl

I am writing a 2D graphics application that requires the use of fonts. I have used the implementation of fonts in the “OpenGL Programming Guide” but since only capital alphabetic letters were defined, I would have to define numbers and symbols, etc. myself. Before I do this I wanted to know if there is an existing package that can do this. I’ve already tried glBDF but it didn’t work on the Borland C++Builder 5.0 compiler, and additionaly I would require it to be open source, which it is not. I only need the most simple text implements, so advanced features are not neccesary (maybe a table feature, but that would be it) Thanks if you can provide information on this to me.

-Mike Powers


See at :

You 'll can display font with ths lesson

“I only need the most simple text implements”

glutBitmapCharacter() may be all you require.
It has only 8 fonts to choose from, but it will render every character on your keyboard. Upper and lower case as well.
I use it to label objects in 3D space. You just set a glRasterPos() to anchor the first character, then stream the characters and glut will space the remaining out for ya.

I like it for 3D because the labels follow my
model no matter where I translate/rotate and the text stays in a horizontal orientation.

The glutBitmapCharacter() would do the job nicely- I only really need 1 font. Thanks for the info, but the problem here is that I’m not using glut here- I’m working in the wxWindows Framework with the wxGLCanvas control. If I could use the glut function without using glut to do anything else that would be great, but I don’t know if it is possible.

If I can’t, does anyone know of a similar function that would work without using glut?



a great API to draw font with opengl :