From 619c598195de4fc32af95d6b6608ba00f91b5dfc Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Mar 2008 19:08:34 +0000 Subject: [PATCH] tried to fix font layout --- lib/devices/swf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 1.7.10.4