I need to display TrueType fonts in OpenGL, in a C program. This needs to work o
ID: 658839 • Letter: I
Question
I need to display TrueType fonts in OpenGL, in a C program. This needs to work on fairly old hardware, so something using the old fixed function pipeline rather than making heavy use of shaders would be good. Can someone suggest a good alternative to FTGL?
Reasons FTGL doesn't quite work for me:
The C API leaves out an important feature of the C++ API: the ability to get a bounding box for a "partial string" from a layout (it should take a char pointer and a length argument, rather than just taking a char pointer and reading to the first null character).
I need this feature so I can determine where pointer events fall within a string, because I need to implement caret insertion and text selection capability.
I can live without this rendering technique, but it would be nice to have.
Explanation / Answer
I'm using freetype-gl for now. It uses contour textures, they look great. It also uses shaders, but they seem to work alright on the hardware I tested on. It's pretty rough around the edges but I think it will handle my use cases.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.