Store fractional point size in wxMSW wxNativeFontInfo

We can't losslessly recover the fractional point size from LOGFONT, so
store it in parallel.
This commit is contained in:
Vadim Zeitlin
2018-09-12 17:49:21 +02:00
parent 4be459d98e
commit 2823e289d8
2 changed files with 15 additions and 1 deletions

View File

@@ -118,9 +118,14 @@ public:
// set the XFLD
void SetXFontName(const wxString& xFontName);
#elif defined(__WXMSW__)
wxNativeFontInfo(const LOGFONT& lf_) : lf(lf_) { }
wxNativeFontInfo(const LOGFONT& lf_) : lf(lf_), pointSize(0.0f) { }
LOGFONT lf;
// MSW only has limited support for fractional point sizes and we need to
// store the fractional point size separately if it was initially specified
// as we can't losslessly recover it from LOGFONT later.
float pointSize;
#elif defined(__WXOSX__)
public:
wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); }