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;