fontdlg italic fontstyles fix.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Changelog:

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

Rein.
-- 
Rein Klazes
rklazes@xxxxxxxxx
--- 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;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux