rougier / freetype-gl

OpenGL text using one vertex buffer, one texture and FreeType
Other
1.65k stars 266 forks source link

Single font encompassing multiple atlases #180

Closed monolifed closed 6 years ago

monolifed commented 6 years ago

Is a font encompassing multiple atlases possible? As far as I can tell the library assumes the font will fit in a single atlas. Also, the font-manager uses a single atlas for every font. It could be better if it created a new atlas if the previous one is full (i.e. when the new font won't fit in it, but then there is also the problem of a font not fitting in an atlas of the given dimensions).

rougier commented 6 years ago

Best would be to have several atlases and to bind them if necessary. However, I have no time right now to do that. Can you give a try?

monolifed commented 6 years ago

Thanks, that should work too.
Edit: Adding the atlas pointer to glyphs did the job with minimal effort.