X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fttf.c;h=606bce1407fd80e3c893edab869fcaa9e0e40bae;hb=9f0d2f992e4338ecb2a15f07b65e738540099ced;hp=19a097d8455a955b1b8923c2120f312e38d8746e;hpb=fdd99ebecfef4874ea12bc97839fa027a0e8ed2f;p=swftools.git diff --git a/lib/ttf.c b/lib/ttf.c index 19a097d..606bce1 100644 --- a/lib/ttf.c +++ b/lib/ttf.c @@ -405,8 +405,8 @@ static table_os2_t*os2_new(ttf_t*ttf) os2->ySuperscriptYOffset = (ttf->head->ymax - ttf->head->ymin)/2; os2->yStrikeoutSize = ttf->head->units_per_em / 10; os2->yStrikeoutPosition = ymid; - os2->usWinAscent = ttf->head->ymax>0?ttf->head->ymax:0; - os2->usWinDescent = ttf->head->ymin<0?-ttf->head->ymin:0; + os2->usWinAscent = ttf->ascent; + os2->usWinDescent = -ttf->descent; os2->sxHeight = ymid; os2->sCapHeight = height*2/3; }