From: kramm Date: Wed, 12 Mar 2008 19:08:34 +0000 (+0000) Subject: tried to fix font layout X-Git-Tag: buttons-working~420 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=619c598195de4fc32af95d6b6608ba00f91b5dfc;p=swftools.git tried to fix font layout --- diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 4f3b970..8cbfec0 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -2470,8 +2470,8 @@ static SWFFONT* gfxfont_to_swffont(gfxfont_t*font, const char* id) advance = xmax; } - if(advance<32768) { - swffont->glyph[t].advance = advance; + if(advance<32768/20) { + swffont->glyph[t].advance = advance*20; } else { swffont->glyph[t].advance = 32767; } @@ -2489,6 +2489,9 @@ static SWFFONT* gfxfont_to_swffont(gfxfont_t*font, const char* id) swffont->layout->descent = (bounds.ymax - bounds.ymin)/2; swffont->layout->leading = bounds.ymax - bounds.ymin; } + swffont->layout->descent= (bounds.ymax - bounds.ymin); + swffont->layout->ascent = 0; + swffont->layout->leading = bounds.ymax - bounds.ymin; return swffont; }