From a6257045b4ec8b161bc612e56a9fb10f3d23298f Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 7 Dec 2005 19:39:33 +0000 Subject: [PATCH] only remove empty glyphs if they don't have a name --- lib/gfxfont.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/gfxfont.c b/lib/gfxfont.c index 8fba3de..1646418 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -347,7 +347,7 @@ gfxfont_t* gfxfont_load(char*filename, double quality) } l = l->next; } - if(!ok) { + if(!ok && !(name)) { gfxline_free(font->glyphs[font->num_glyphs].line); font->glyphs[font->num_glyphs].line = 0; font->glyphs[font->num_glyphs].advance = 0; @@ -357,8 +357,7 @@ gfxfont_t* gfxfont_load(char*filename, double quality) have unicode indices attached to them. Remove that information, in order to not confuse any converter applications. - - TODO: what about space characters? */ + */ font->glyphs[font->num_glyphs].unicode = 0; if(font->glyphs[font->num_glyphs].name) { free(font->glyphs[font->num_glyphs].name); -- 1.7.10.4