fontdlg patch nr 7

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

 



Hi,

Further testing with setting the font in Windows winfile showed some
more problems.

Changelog:
	dlls/commdlg	: fontdlg.c
			  fontdlg16.c

	Use the lfHeight field to initialize the font dialog's
	point size. Do not forget to return some values in the
	choosefont structure in the 16 bit version of the ChooseFont
	function.

Rein.
-- 
Rein Klazes
rklazes@xxxxxxxxx
--- refwine/dlls/commdlg/fontdlg.c	2003-12-03 19:03:48.000000000 +0100
+++ mywine/dlls/commdlg/fontdlg.c	2003-12-03 19:05:33.000000000 +0100
@@ -615,7 +615,7 @@
 static INT CFn_FitCharSet( HWND hDlg, int charset )
 {
     int i,n,cs;
-    /* look for fitting har set in combobox5 */
+    /* look for fitting char set in combobox5 */
     n=SendDlgItemMessageA(hDlg, cmb5, CB_GETCOUNT, 0, 0);
     for (i=0;i<n;i++)
     {
@@ -737,9 +737,11 @@
             j=SendDlgItemMessageA(hDlg,cmb1,CB_FINDSTRING,-1,(LONG)lpxx->lfFaceName);
             if (j!=CB_ERR)
             {
-                INT height = (lpcf->iPointSize + 5) / 10;
+                INT height = lpxx->lfHeight < 0 ? -lpxx->lfHeight :
+                    lpxx->lfHeight;
                 int charset = lpxx->lfCharSet;
-                pstyle=MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:FW_NORMAL,lpxx->lfItalic !=0);
+                pstyle = MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:
+                        FW_NORMAL,lpxx->lfItalic !=0);
                 SendDlgItemMessageA(hDlg, cmb1, CB_SETCURSEL, j, 0);
                 SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
                         (LPARAM)GetDlgItem(hDlg,cmb1));
--- refwine/dlls/commdlg/fontdlg16.c	2003-12-03 19:03:48.000000000 +0100
+++ mywine/dlls/commdlg/fontdlg16.c	2003-12-03 19:04:46.000000000 +0100
@@ -227,6 +227,11 @@
     }
     lpChFont->lpTemplateName=lpTemplateName;
 
+    lpChFont->iPointSize = cf32a.iPointSize;
+    lpChFont->Flags = cf32a.Flags;
+    lpChFont->rgbColors = cf32a.rgbColors;
+    lpChFont->lCustData = cf32a.lCustData;
+    lpChFont->nFontType = cf32a.nFontType;
 
     font16 = MapSL(lpChFont->lpLogFont);
     font16->lfHeight = cf32a.lpLogFont->lfHeight;

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

  Powered by Linux