fontdlg italic fontstyles fix.

Rein Klazes rklazes at xs4all.nl
Thu Nov 27 10:52:55 CST 2003


Hi,

Changelog:

	dlls/commdlg	: fontdlg.c
	Fix a bug in the test for italic font style property.

Rein.
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- refwine/dlls/commdlg/fontdlg.c	2003-11-26 20:34:28.000000000 +0100
+++ mywine/dlls/commdlg/fontdlg.c	2003-11-26 20:53:04.000000000 +0100
@@ -442,8 +442,8 @@
         int weight;
         char stname[20]; };
         static struct FONTSTYLE fontstyles[FSTYLES]={
-            { 0,FW_NORMAL,"Regular"},{0,FW_BOLD,"Bold"},
-            { 1,FW_NORMAL,"Italic"}, {1,FW_BOLD,"Bold Italic"}};
+            { 0,FW_NORMAL,"Regular"}, { 1,FW_NORMAL,"Italic"},
+            { 0,FW_BOLD,"Bold"}, { 1,FW_BOLD,"Bold Italic"}};
             HFONT hf;
             TEXTMETRICA tm;
             int i,j;
@@ -460,9 +460,9 @@
                 GetTextMetricsA(hdc,&tm);
                 hf=SelectObject(hdc,hf);
                 DeleteObject(hf);
-
+                /* font successful created ? */
                 if (tm.tmWeight==fontstyles[i].weight &&
-                        tm.tmItalic==fontstyles[i].italic)    /* font successful created ? */
+                        ((tm.tmItalic != 0)==fontstyles[i].italic))
                 {
                     j=SendMessageA(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname );
                     if (j==CB_ERR) return 1;


More information about the wine-patches mailing list