[cairo-commit] 2 commits - src/cairo-win32-font.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Mar 16 15:21:28 PDT 2007
src/cairo-win32-font.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
New commits:
diff-tree 6f96a5dd9954418b252ec45752dcf2c3b289fed4 (from 47e71eef5f903fa1a96d82a79a75d89c52032913)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Mar 16 18:21:36 2007 -0400
[win32] Really return unhinted font metrics if metrics hinting is off
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 7eea222..de81c0a 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -693,7 +693,7 @@ _cairo_win32_scaled_font_set_metrics (ca
if (!hdc)
return CAIRO_STATUS_NO_MEMORY;
- if (scaled_font->preserve_axes) {
+ if (scaled_font->preserve_axes || scaled_font->base.options.hint_metrics == CAIRO_HINT_METRICS_OFF) {
/* For 90-degree rotations (including 0), we get the metrics
* from the GDI in logical space, then convert back to font space
*/
diff-tree 47e71eef5f903fa1a96d82a79a75d89c52032913 (from dd4601b0d03bba021b11dcf96e09584f40d1621f)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Mar 16 17:56:53 2007 -0400
[win32] Fix font descent computation
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 679d52d..7eea222 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -723,7 +723,7 @@ _cairo_win32_scaled_font_set_metrics (ca
_cairo_win32_scaled_font_done_unscaled_font (&scaled_font->base);
extents.ascent = (double)metrics.tmAscent / scaled_font->em_square;
- extents.descent = metrics.tmDescent * scaled_font->em_square;
+ extents.descent = (double)metrics.tmDescent / scaled_font->em_square;
extents.height = (double)(metrics.tmHeight + metrics.tmExternalLeading) / scaled_font->em_square;
extents.max_x_advance = (double)(metrics.tmMaxCharWidth) / scaled_font->em_square;
extents.max_y_advance = 0;
More information about the cairo-commit
mailing list