Closed cmrschwarz closed 7 years ago
Nice, thanks. Could you write a simple example showing usage ?
font.zip Alright I made this ...thing based on the font.c demo. Just put the c file in place of the current font.c and it should work. Can't really test it so it might have some stupid errors, sorry. Should show the resizing quite nicely. Only problem with this method is that it doesn't handle multiple fonts in one atlas. IMHO you shouldn't do that anyway in production code anyway, but it could be made possible using an array of fonts as parameter instead, or by creating a inform_font_atlas_size_changed(f,w,h) method.
Thanks !
Thank you for merging :).
Added the method texture_font_enlarge_atlas which allows resizing of the texture atlas while keeping all existing glyphs validated. Unfortunately it has to be part of the texture_font_t "class" as the glyphs' uvs need to be updated.