X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxfont.c;h=db78c25a3d9e233ce806c450150b33e9e8076d72;hb=6dd8c2fc3eae2c30f90696fcc49f89f79817a533;hp=85af571905d2060f41392903a90bef68cf096c50;hpb=6c3ab5574d31504d24710c2756899d49275c1a37;p=swftools.git diff --git a/lib/gfxfont.c b/lib/gfxfont.c index 85af571..db78c25 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); } @@ -508,6 +508,10 @@ void gfxfont_free(gfxfont_t*font) if(font->unicode2glyph) { free(font->unicode2glyph);font->unicode2glyph = 0; } + if(font->id) { + free((void*)font->id);font->id=0; + } + free(font); }