How to use True Type Fonts in a C program using OpenGl on Linux

How do we go about using True type fonts in a OpenGl program using C on Linux platform.
how to import the ttf files.
please help. its urgent.


Hi !

If your X server has TT support then you can use the glXUseOutlineFont function (not sure about the name, but it’s something like that).

The other choice is to use FreeType and GLTT to get the font geometry into GL.

GLTT can be found in
Note: GLTT requires FreeType version 1 unless it has been updated.


Hi again !

Sorry about that, even if you have TT support in X, I don’t think GLX can use them, so you have to use FreeType I guess.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.