gecko-dev/gfx/cairo/win32-extents.diff
2005-06-14 21:49:08 +00:00

27 lines
1.3 KiB
Diff

Index: cairo/src/cairo-win32-font.c
===================================================================
RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-win32-font.c,v
retrieving revision 1.1
diff -u -8 -p -r1.1 cairo-win32-font.c
--- cairo/src/cairo-win32-font.c 4 Jun 2005 07:03:27 -0000 1.1
+++ cairo/src/cairo-win32-font.c 14 Jun 2005 21:14:20 -0000
@@ -709,17 +709,17 @@ _cairo_win32_scaled_font_glyph_extents (
* of the font.
*/
status = _cairo_win32_scaled_font_select_unscaled_font (&scaled_font->base, hdc);
GetGlyphOutlineW (hdc, glyphs[0].index, GGO_METRICS | GGO_GLYPH_INDEX,
&metrics, 0, NULL, &matrix);
_cairo_win32_scaled_font_done_unscaled_font (&scaled_font->base);
extents->x_bearing = (double)metrics.gmptGlyphOrigin.x / scaled_font->em_square;
- extents->y_bearing = (double)metrics.gmptGlyphOrigin.y / scaled_font->em_square;
+ extents->y_bearing = - (double)metrics.gmptGlyphOrigin.y / scaled_font->em_square;
extents->width = (double)metrics.gmBlackBoxX / scaled_font->em_square;
extents->height = (double)metrics.gmBlackBoxY / scaled_font->em_square;
extents->x_advance = (double)metrics.gmCellIncX / scaled_font->em_square;
extents->y_advance = (double)metrics.gmCellIncY / scaled_font->em_square;
}
return CAIRO_STATUS_SUCCESS;
}