From 69586bb03bcd8542b866558ea6db0fd6f275e645 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Dec 2018 23:54:32 +0100 Subject: [PATCH] Reuse wxNativeFontInfo::GetLogFontHeightAtPPI() Instead of calling ::MulDiv() directly, reuse GetLogFontHeightAtPPI() as it is more readable. --- src/msw/textctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 2fb9da0c49..8e20586ee0 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -3124,7 +3124,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style) // Convert the height from the units of 1/20th of the point in which // CHARFORMAT stores it to pixel-based units used by LOGFONT. const wxCoord ppi = wxClientDC(this).GetPPI().y; - lf.lfHeight = -MulDiv(cf.yHeight/20, ppi, 72); + lf.lfHeight = wxNativeFontInfo::GetLogFontHeightAtPPI(cf.yHeight/20.0f, ppi); lf.lfWidth = 0; lf.lfCharSet = ANSI_CHARSET; // FIXME: how to get correct charset? lf.lfClipPrecision = 0;