OpenGL and fonts

Hi everyone,

How do OpenGL developers cope with font? I mean there seems to be only 2 choices:

  • bitmapped fonts. These look really bad because of lack of anti-aliasing.

  • load the font into a texture. This is also very limiting as I need to display unicode characters. A full unicode texture would, of course, overwhelm the graphics card…

Does anyone know of another technique or might have done this in another way… that lets you render anti-aliased fonts… I do not need to do any stretching/rotating etc. I just need to display them in a presentable way.



there’s the possibility of drawing your text into an offscreen surface (using GDI or better yet the freetype library for example) then using that surface as a texture to draw on screen.

I’ve never tried this (too much work and bitmap fonts good enough for me) and of course it doesn’t work well for highly dynamic text stuff. But like everything else in programming this is a tradeoff between quality and performance.