[SDL] Polygon fonts for SDL/OpenGL

Jan Becker tahoma at gmx.de
Fri Jan 10 14:04:01 PST 2003

> For my next project I would really like to have a source of nice
> fonts. Ideally I would like something that converts a truetype font to
> nice set polygon definitions. Does anyone know a package that will do
> that conversion? I've searched and haven't found anything that does
> I want. FTGL comes close, in that it contains code to tessellate the
> polygon data in a .ttf file.

You can use lib freetype to get the outlines of each character and
tesselate them with gluTesselators or by your own.
Tesselation of non convex polygons is not trivial at least if they
contain holes. There are some good algorithms around there (e.g. Seidel
algorithm). Some time ago a patched a small lib to work for me. You can
contact me, if you want the sourcecode. I haven't made it public
available yet.

> I'm about to start hacking FTGL to do what I want. But, I thought I'd
> ask if anyone else has already done it before I spend the time.
> 		Bob Pendleton
> --
> +------------------------------------+
> + Bob Pendleton, consultant for hire +
> + Resume: http://www.jump.net/~bobp  +
> + Email:  bob at pendleton.com          +
> +------------------------------------+
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

More information about the SDL mailing list