X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxfont.c;h=efe29c3f81011a49a982e028a5d4e1373ebade0a;hp=263757fb01ed5ba96fe38f910a64ba539b419f7a;hb=e47d392189dc87d32caf72cc6479117d512405a4;hpb=6179361ff3d4f22a2cbb83895768392556093362 diff --git a/lib/gfxfont.c b/lib/gfxfont.c index 263757f..efe29c3 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -173,7 +173,7 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali return 0; } if(face->num_glyphs <= 0) { - fprintf(stderr, "File %s contains %d glyphs\n", face->num_glyphs); + fprintf(stderr, "File %s contains %d glyphs\n", filename, (int)face->num_glyphs); return 0; } @@ -333,9 +333,9 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali error = FT_Load_Glyph(face, t, FT_LOAD_NO_BITMAP); if(error) { if(hasname) - fprintf(stderr, "Warning: glyph %d/%d (unicode %d, name %s) has return code %d\n", t, face->num_glyphs, glyph2unicode[t], name, error); + fprintf(stderr, "Warning: glyph %d/%d (unicode %d, name %s) has return code %d\n", t, (int)face->num_glyphs, glyph2unicode[t], name, error); else - fprintf(stderr, "Warning: glyph %d/%d (unicode %d) has return code %d\n", t, face->num_glyphs, glyph2unicode[t], error); + fprintf(stderr, "Warning: glyph %d/%d (unicode %d) has return code %d\n", t, (int)face->num_glyphs, glyph2unicode[t], error); omit = 2; #if 0 @@ -358,7 +358,7 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali if(!omit) { error = FT_Get_Glyph(face->glyph, &glyph); if(error) { - fprintf(stderr, "Couldn't get glyph %d/%d, error:%d\n", t, face->num_glyphs, error); + fprintf(stderr, "Couldn't get glyph %d/%d, error:%d\n", t, (int)face->num_glyphs, error); omit = 3; } } @@ -488,7 +488,7 @@ gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quali } #else -gfxfont_t* gfxfont_load(char*filename) +gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quality) { fprintf(stderr, "No freetype support compiled in! Not able to load %s\n", filename); } @@ -511,6 +511,9 @@ void gfxfont_free(gfxfont_t*font) if(font->id) { free((void*)font->id);font->id=0; } + if(font->kerning) { + free(font->kerning);font->kerning=0; + } free(font); }