Fix y_offset negation
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Oct 2010 21:36:41 +0000 (17:36 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Oct 2010 21:36:41 +0000 (17:36 -0400)
modules/basic/basic-fc.c

index cd5cebe..5ac7c77 100644 (file)
@@ -167,8 +167,8 @@ pango_fc_hb_font_get_glyph_metrics (hb_font_t *font, hb_face_t *face, const void
 
   metrics->x_advance = logical.width;
   metrics->y_advance = 0;
-  metrics->x_offset  = ink.x;
-  metrics->y_offset  = ink.y;
+  metrics->x_offset  =  ink.x;
+  metrics->y_offset  = -ink.y;
   metrics->width     = ink.width;
   metrics->height    = ink.height;
 }
@@ -279,8 +279,8 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
       last_cluster = glyphs->log_clusters[i];
 
       glyphs->glyphs[i].geometry.width = hb_position->x_advance;
-      glyphs->glyphs[i].geometry.x_offset = hb_position->x_offset;
-      glyphs->glyphs[i].geometry.y_offset = hb_position->y_offset;
+      glyphs->glyphs[i].geometry.x_offset =  hb_position->x_offset;
+      glyphs->glyphs[i].geometry.y_offset = -hb_position->y_offset;
 
       hb_glyph++;
       hb_position++;