X and fonts, any alternative?
I am trying to simply select a font and draw with it in X. So far I have had to create multiple functions, scanning, parsing, and comparing the fonts in XListFonts to attempt to find a close match to whatever font I am using at the time.
Needless to say this is a pain in the ass, as many of you who have done this will know. I don't need fancy fonts or features, I just simply need to be able to draw plain text to a context, in this case an OpenGL context which I use glXUseXFont to generate a usable set of glyphs for rendering.
Is there an easier way I can obtain a matching font? I dont need a boat load of features, I dont really want to use an extra lib just for loading a font (i.e. FreeType, etc...), but I dont want to have to worry about the end user getting all sorts of font issues with my program.
I am looking for more of a simple loadFont(Name, Size, Hints), which will load the proper font, or one as close as possible.
Any help would be much appreciated
Last edited by thedevilsjester; 10-06-2005 at 10:50 PM.
|