[cairo-commit] cairo/src cairo-win32-font.c,1.39,1.39.2.1

Tor Lillqvist commit at pdx.freedesktop.org
Mon Sep 26 09:05:16 PDT 2005


Committed by: tml

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv9128/src

Modified Files:
      Tag: BRANCH_1_0
	cairo-win32-font.c 
Log Message:
2005-09-26  Tor Lillqvist  <tml at 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)



Index: cairo-win32-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-font.c,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -d -r1.39 -r1.39.2.1
--- cairo-win32-font.c	19 Aug 2005 19:08:42 -0000	1.39
+++ cairo-win32-font.c	26 Sep 2005 16:05:14 -0000	1.39.2.1
@@ -324,7 +324,7 @@
 {
     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 @@
 	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;



More information about the cairo-commit mailing list