From 00ebbfaab48da1497e50909fbd02e2f4b5f48048 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 9 May 2001 13:12:46 +0000 Subject: [PATCH] From RDB: yet another fix in the ongoing quest to deal correctly with font point sizes :-( [originally from svn r1103] --- windlg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/windlg.c b/windlg.c index 76f1ecae..5b2bac26 100644 --- 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);