Implement support for numeric weights specified in wxFontInfo

Update the major ports to use wxFontInfo::GetNumericWeight() instead of
GetWeight().
This commit is contained in:
Vadim Zeitlin
2018-09-12 19:13:18 +02:00
parent 23f2929eb4
commit 054c5c4af7
4 changed files with 39 additions and 33 deletions

View File

@@ -36,19 +36,7 @@ public:
// ctors and such
wxFont() { }
wxFont(const wxFontInfo& info)
{
Create(info.GetFractionalPointSize(),
info.GetFamily(),
info.GetStyle(),
info.GetWeight(),
info.IsUnderlined(),
info.GetFaceName(),
info.GetEncoding());
if ( info.IsUsingSizeInPixels() )
SetPixelSize(info.GetPixelSize());
}
wxFont(const wxFontInfo& info);
wxFont( wxOSXSystemFont systemFont );
wxFont(CTFontRef font);
@@ -71,7 +59,7 @@ public:
wxFont(float size,
wxFontFamily family,
wxFontStyle style,
wxFontWeight weight,
int weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
@@ -102,7 +90,7 @@ public:
bool Create(float size,
wxFontFamily family,
wxFontStyle style,
wxFontWeight weight,
int weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);