Merge branch 'tm_fix_fonts_on_win'

This commit is contained in:
tamasmeszaros 2020-05-04 16:15:47 +02:00
commit ddeac631c4

View file

@ -134,11 +134,8 @@ wxFont get_default_font_for_dpi(int dpi)
NONCLIENTMETRICS nm; NONCLIENTMETRICS nm;
memset(&nm, 0, sizeof(NONCLIENTMETRICS)); memset(&nm, 0, sizeof(NONCLIENTMETRICS));
nm.cbSize = sizeof(NONCLIENTMETRICS); nm.cbSize = sizeof(NONCLIENTMETRICS);
if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi)) { if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi))
wxNativeFontInfo info; return wxFont(wxNativeFontInfo(nm.lfMessageFont));
info.lf = nm.lfMessageFont;
return wxFont(info);
}
} }
// Then try to guesstimate the font DPI scaling on Windows 8. // Then try to guesstimate the font DPI scaling on Windows 8.
// Let's hope that the font returned by the SystemParametersInfo(), which is used by wxWidgets internally, makes sense. // Let's hope that the font returned by the SystemParametersInfo(), which is used by wxWidgets internally, makes sense.