More steps towards using wxFontInfo in all ports

Replace AccountForCompatValues() with InfoFromLegacyParams() which
directly constructs wxFontInfo from the old-style parameters, applying
all the compatibility hacks internally.

There are no real changes in this commit, just simplify the code further
and make wxFontInfo more central.
This commit is contained in:
Vadim Zeitlin
2018-09-14 19:26:26 +02:00
parent 7866c293e8
commit 9627798496
9 changed files with 127 additions and 100 deletions

View File

@@ -521,15 +521,10 @@ bool wxFont::Create(int pointSize,
const wxString& faceName,
wxFontEncoding encoding)
{
AccountForCompatValues(pointSize, style, weight);
m_refData = new wxFontRefData(InfoFromLegacyParams(pointSize, family,
style, weight, underlined,
faceName, encoding));
m_refData = new wxFontRefData(wxFontInfo(pointSize).
Family(family).
Style(style).
Weight(GetNumericWeightOf(weight)).
Underlined(underlined).
FaceName(faceName).
Encoding(encoding));
return true;
}