summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/cairo-win32-font.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index adf242d85..5d9b5809b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-26 Tor Lillqvist <tml@novell.com>
+
+ * src/cairo-win32-font.c (_win32_scaled_font_get_scaled_hfont),
+ (_win32_scaled_font_get_unscaled_hfont): Set LOGFONT::lfHeight
+ negative. A negative lfHeight means "em height" which is what we
+ want, and matches how other toolkits interpret font sizes on
+ Win32. (Positive lfHeight means "cell height".) (#4593)
+
2005-09-20 T Rowley <tim.rowley@gmail.com>
* src/cairo-atsui-font.c (_cairo_atsui_font_show_glyphs):
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 1e516abda..ff20c1a66 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -324,7 +324,7 @@ _win32_scaled_font_get_scaled_hfont (cairo_win32_scaled_font_t *scaled_font)
{
if (!scaled_font->scaled_hfont) {
LOGFONTW logfont = scaled_font->logfont;
- logfont.lfHeight = scaled_font->logical_size;
+ logfont.lfHeight = -scaled_font->logical_size;
logfont.lfWidth = 0;
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;
@@ -379,7 +379,7 @@ _win32_scaled_font_get_unscaled_hfont (cairo_win32_scaled_font_t *scaled_font,
free (otm);
logfont = scaled_font->logfont;
- logfont.lfHeight = scaled_font->em_square;
+ logfont.lfHeight = -scaled_font->em_square;
logfont.lfWidth = 0;
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;