Finally fixed the point/pixel confusion in font handling. Thanks to
[u/mdw/putty] / window.c
index a54d507..f724275 100644 (file)
--- a/window.c
+++ b/window.c
@@ -808,6 +808,9 @@ font_messup:
     hdc = GetDC(hwnd);
 
     font_height = cfg.fontheight;
+    if (font_height > 0) {
+        font_height = -MulDiv(font_height, GetDeviceCaps(hdc, LOGPIXELSY), 72);
+    }
     font_width = pick_width;
 
 #define f(i,c,w,u) \