]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
From RDB: yet another fix in the ongoing quest to deal correctly
authorSimon Tatham <anakin@pobox.com>
Wed, 9 May 2001 13:12:46 +0000 (13:12 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 9 May 2001 13:12:46 +0000 (13:12 +0000)
with font point sizes :-(

[originally from svn r1103]

windlg.c

index 76f1ecaee328fa20b8f6459720a0b78e64316285..5b2bac26a56a4090f26eadc46c23523b62a031cf 100644 (file)
--- a/windlg.c
+++ b/windlg.c
@@ -1720,7 +1720,13 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg,
                    MyGetDlgItemInt(hwnd, IDC_SAVEEDIT, &cfg.savelines);
                break;
              case IDC_CHOOSEFONT:
-               lf.lfHeight = cfg.fontheight;
+               {
+                   HDC hdc = GetDC(0);
+                   lf.lfHeight = -MulDiv(cfg.fontheight,
+                                         GetDeviceCaps(hdc, LOGPIXELSY),
+                                         72);
+                   ReleaseDC(0, hdc);
+               }
                lf.lfWidth = lf.lfEscapement = lf.lfOrientation = 0;
                lf.lfItalic = lf.lfUnderline = lf.lfStrikeOut = 0;
                lf.lfWeight = (cfg.fontisbold ? FW_BOLD : 0);