1
\$\begingroup\$

I have begun work on an OpenGL application (all on my own and with little knowledge) and started with FTGL, rendering true type fonts, which, with alot of text has a great impact on frames per second.

I believe that to overcome this limitation one needs to generate a font atlas and save glyphs to opengl textures which are then drawn by shaders.

I have done a search of github for such a library and found several, a few of which are incomplete (and by their own admission have memory leaks)

I am looking for, and hoping that one of you can recommend, the most stable opengl font library that you preffer and does the aforementioned. I also need unicode support.

Or a guide to help a noob like me achieve this

Thankyou for reading

\$\endgroup\$
1
\$\begingroup\$

Personally, I've used the BinPacking by Jukka Jylänki (see http://clb.demon.fi/files/RectangleBinPack.pdf and http://clb.demon.fi/files/RectangleBinPack/) to build a glyph atlas. Combined with the freetype library (http://freetype.org/) for loading glyphs from ttf fonts and a routine to turn utf8 strings into unicode codepoints (RFC3629 is very informative, see https://tools.ietf.org/html/rfc3629), this makes up my font system.

If you don't want to write your own, I would recommend freetype-gl (https://github.com/rougier/freetype-gl) for being bug free and relatively easy to use. It also has most features you'd want in a text renderer, like outlines, shadows and other effects.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.