Merge branch 'msw-fontinfo-v0-fix'
Fix a user visible regression after fractional point size changes: don't create 0-sized fonts from the wxNativeFontInfo version 0 strings. See https://github.com/wxWidgets/wxWidgets/pull/1422
This commit is contained in:
@@ -118,7 +118,14 @@ public:
|
||||
// set the XFLD
|
||||
void SetXFontName(const wxString& xFontName);
|
||||
#elif defined(__WXMSW__)
|
||||
wxNativeFontInfo(const LOGFONT& lf_);
|
||||
wxNativeFontInfo(const LOGFONT& lf_)
|
||||
: lf(lf_),
|
||||
pointSize(GetPointSizeFromLogFontHeight(lf.lfHeight))
|
||||
{
|
||||
}
|
||||
|
||||
// MSW-specific: get point size from LOGFONT height using the default DPI.
|
||||
static float GetPointSizeFromLogFontHeight(int height);
|
||||
|
||||
// MSW-specific: get the height value in pixels using LOGFONT convention
|
||||
// (i.e. negative) corresponding to the given size in points and DPI.
|
||||
|
Reference in New Issue
Block a user