[pango] Do not multiply return value of CTFontGetDescent with -1



commit 20889f065700ef005b1016729e9c26e078ef9e8a
Author: Kristian Rietveld <kris gtk org>
Date:   Sun Dec 6 20:53:20 2009 +0100

    Do not multiply return value of CTFontGetDescent with -1
    
    The return value of CTFontGetDescent is already positive, as opposed
    to the ats_metrics.descent value used before.  This is a regression
    introduced by the previous patch "porting" the backend to CoreText, which
    also broke support for Tiger and earlier -- we will fix that soonish.

 pango/pangocairo-atsuifont.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pango/pangocairo-atsuifont.c b/pango/pangocairo-atsuifont.c
index 2147244..91391e7 100644
--- a/pango/pangocairo-atsuifont.c
+++ b/pango/pangocairo-atsuifont.c
@@ -134,7 +134,7 @@ pango_cairo_atsui_font_create_metrics_for_context (PangoCairoFont *font,
   metrics = pango_font_metrics_new ();
 
   metrics->ascent = CTFontGetAscent(ct_font) * PANGO_SCALE;
-  metrics->descent = -CTFontGetDescent(ct_font) * PANGO_SCALE;
+  metrics->descent = CTFontGetDescent(ct_font) * PANGO_SCALE;
 
   metrics->underline_position = CTFontGetUnderlinePosition(ct_font) * PANGO_SCALE;
   metrics->underline_thickness = CTFontGetUnderlineThickness(ct_font) * PANGO_SCALE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]