X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswffont.c;h=bfaa1a46650adf0353caf1d4454b14288f711df0;hb=f567c3e994871f6e95299f9365b1060f7ee81223;hp=7ed72eddaa4992d82d16d6a0c5bb97f94d47fe0c;hpb=76b773b7f600d8dc9422d8b14eea547b6dab490a;p=swftools.git diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index 7ed72ed..bfaa1a4 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -133,7 +133,7 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) font->layout->ascent = face->ascender*20/FT_SUBPIXELS; //face->bbox.xMin; font->layout->descent = abs(face->descender)*20/FT_SUBPIXELS; //face->bbox.xMax; - font->layout->leading = -face->bbox.xMin*20/FT_SUBPIXELS; + font->layout->leading = abs(face->bbox.yMin - face->bbox.yMax); //-face->bbox.xMin*20/FT_SUBPIXELS; font->layout->kerningcount = 0; name = FT_Get_Postscript_Name(face); @@ -256,7 +256,6 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) FT_Done_Glyph(glyph); font->glyph2ascii[font->numchars] = font->glyph2ascii[t]; glyph2glyph[t] = font->numchars; - printf("%d %d\n", t, glyph2glyph[t]); font->numchars++; } /* notice: if skipunused is true, font->glyph2ascii, font->glyphnames and font->layout->bounds will @@ -266,7 +265,6 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) for(t=0;tmaxascii;t++) { if(font->ascii2glyph[t]>=0) { font->ascii2glyph[t] = glyph2glyph[font->ascii2glyph[t]]; - printf("ascii %d -> glyph %d\n", t, font->ascii2glyph[t]); } } free(glyph2glyph);