From 945b5b361b5def4d27205a39aa16b83adea34b43 Mon Sep 17 00:00:00 2001
From: Matthias Kramm <kramm@quiss.org>
Date: Wed, 3 Mar 2010 18:32:14 -0800
Subject: [PATCH] fixed os/2 descent

---
 lib/ttf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ttf.c b/lib/ttf.c
index 3774b50..3349aa9 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;
-	os2->usWinDescent = ttf->head->ymin<0?0:ttf->head->ymin;
+	os2->usWinAscent = ttf->head->ymax>0?ttf->head->ymax:0;
+	os2->usWinDescent = ttf->head->ymin<0?-ttf->head->ymin:0;
 	os2->sxHeight = ymid;
 	os2->sCapHeight = height*2/3;
     }
-- 
1.7.10.4