[HB] Make y grow down
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 21 Apr 2011 19:17:03 +0000 (15:17 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 21 Apr 2011 19:17:03 +0000 (15:17 -0400)
More intuitive.

modules/basic/basic-fc.c
pango/pango-ot-buffer.c
pango/pango-ot-info.c

index 24a8427..119b19e 100644 (file)
@@ -261,8 +261,8 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
                     NULL);
   hb_font_set_scale (hb_font,
                     /* XXX CTM */
-                    ((guint64) ft_face->size->metrics.x_scale * ft_face->units_per_EM) >> 12,
-                    ((guint64) ft_face->size->metrics.y_scale * ft_face->units_per_EM) >> 12);
+                     (((guint64) ft_face->size->metrics.x_scale * ft_face->units_per_EM) >> 12),
+                    -(((guint64) ft_face->size->metrics.y_scale * ft_face->units_per_EM) >> 12));
   is_hinted = fc_font->is_hinted;
   hb_font_set_ppem (hb_font,
                    is_hinted ? ft_face->size->metrics.x_ppem : 0,
@@ -295,8 +295,8 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
        advance = PANGO_UNITS_ROUND (advance);
        */
       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++;
index 26213a5..100e646 100644 (file)
@@ -257,8 +257,8 @@ pango_ot_buffer_output (const PangoOTBuffer *buffer,
       if (is_hinted)
        advance = PANGO_UNITS_ROUND (advance);
       glyphs->glyphs[i].geometry.width = 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++;
index 79c3cb2..5ad5842 100644 (file)
@@ -394,8 +394,8 @@ _pango_ot_info_position    (const PangoOTInfo    *info,
   /* XXX reuse hb_font */
   hb_font = hb_font_create ();
   hb_font_set_scale (hb_font,
-                    ((guint64) info->face->size->metrics.x_scale * info->face->units_per_EM) >> 12,
-                    ((guint64) info->face->size->metrics.y_scale * info->face->units_per_EM) >> 12);
+                     (((guint64) info->face->size->metrics.x_scale * info->face->units_per_EM) >> 12),
+                    -(((guint64) info->face->size->metrics.y_scale * info->face->units_per_EM) >> 12));
   is_hinted = buffer->font->is_hinted;
   hb_font_set_ppem (hb_font,
                    is_hinted ? info->face->size->metrics.x_ppem : 0,