X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswffont.c;h=233b19087950feae499f3f3e6c03a8b5ed0c1a76;hb=eaff678a1de813f56de1df9067100e4da3671802;hp=bbc78d9e1c8fdb429f1cefe10a559ca80f9760da;hpb=19692420849850353a7caf75201f8044359e7627;p=swftools.git diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index bbc78d9..233b190 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -123,16 +123,15 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) font->glyph2ascii = malloc(face->num_glyphs*sizeof(U16)); memset(font->glyph2ascii, 0, face->num_glyphs*sizeof(U16)); font->maxascii = 0; - memset(font->ascii2glyph, -1, font->maxascii*sizeof(int)); font->glyph = malloc(face->num_glyphs*sizeof(SWFGLYPH)); memset(font->glyph, 0, face->num_glyphs*sizeof(U16)); if(FT_HAS_GLYPH_NAMES(face)) { font->glyphnames = malloc(face->num_glyphs*sizeof(char*)); } - font->layout->ascent = face->ascender; //face->bbox.xMin; - font->layout->descent = abs(face->descender); //face->bbox.xMax; - font->layout->leading = -face->bbox.xMin; + 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->kerningcount = 0; name = FT_Get_Postscript_Name(face);