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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user