1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 15:48:06 -05:00

From RDB: yet another fix in the ongoing quest to deal correctly

with font point sizes :-(

[originally from svn r1103]
This commit is contained in:
Simon Tatham 2001-05-09 13:12:46 +00:00
parent bc1a43efe8
commit 00ebbfaab4

View File

@ -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);