Refactor handling point size in wxNativeFontInfo

No real changes yet, this commit just prepares for adding support for
per-monitor DPI by reorganizing some code.
This commit is contained in:
Vadim Zeitlin
2018-12-30 01:06:19 +01:00
parent b62563b907
commit 90186f7740
2 changed files with 59 additions and 17 deletions

View File

@@ -118,7 +118,11 @@ public:
// set the XFLD
void SetXFontName(const wxString& xFontName);
#elif defined(__WXMSW__)
wxNativeFontInfo(const LOGFONT& lf_) : lf(lf_), pointSize(0.0f) { }
wxNativeFontInfo(const LOGFONT& lf_);
// MSW-specific: get the height value in pixels using LOGFONT convention
// (i.e. negative) corresponding to the given size in points and DPI.
int GetLogFontHeightAtPPI(int ppi) const;
LOGFONT lf;