You're probably wondering why anyone would want to re-bake without adding any new fonts. My application requires me to bring up and tear down the X11 context over the course of execution. I need to be able to push the texture to the video card for rendering every time the context is brought up, but I want to optimise by not re-adding fonts that were already loaded (and decompressed).
My testing was done on version 2.00.4. I plan on upgrading my project to use master HEAD soon. If you need me to test on HEAD, I can do that, but probably in a little while.
The issue is that the loaded fonts store their offsets. The first bake we get the correct, zero offsets.
But the second time we try to bake without adding any new fonts, the offsets have the glyph_count at non-zero.
Which causes a segfault here:
glyph = &glyphs[dst_font->glyph_offset + dst_font->glyph_count + (unsigned int)glyph_count];
You're probably wondering why anyone would want to re-bake without adding any new fonts. My application requires me to bring up and tear down the X11 context over the course of execution. I need to be able to push the texture to the video card for rendering every time the context is brought up, but I want to optimise by not re-adding fonts that were already loaded (and decompressed).
My testing was done on version 2.00.4. I plan on upgrading my project to use master HEAD soon. If you need me to test on HEAD, I can do that, but probably in a little while.