From 4949981f46febaa8283b4eb878e01a4131a82778 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Wed, 19 Sep 2012 03:26:52 +0800 Subject: [PATCH] working on asc/des --- src/ffw.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ffw.c b/src/ffw.c index e9d3445..24453ee 100644 --- a/src/ffw.c +++ b/src/ffw.c @@ -238,16 +238,22 @@ void ffw_metric(double * ascent, double * descent) *ascent = *descent = 0; } - info->os2_winascent = *ascent; - info->os2_typoascent = *ascent; - info->hhead_ascent = *ascent; + int a = bb.maxy; + int d = bb.miny; + + sf->descent += sf->ascent; + sf->ascent = 0; + + info->os2_winascent = a; + info->os2_typoascent = a; + info->hhead_ascent = a; info->winascent_add = 0; info->typoascent_add = 0; info->hheadascent_add = 0; - info->os2_windescent = -*descent; - info->os2_typodescent = *descent; - info->hhead_descent = *descent; + info->os2_windescent = -d; + info->os2_typodescent = d; + info->hhead_descent = d; info->windescent_add = 0; info->typodescent_add = 0; info->hheaddescent_add = 0;