Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL and equivalents in the code of the library itself and in the samples. Also simplify font construction using wxFontInfo where possible to avoid specifying these constants at all if they are not needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -118,13 +118,14 @@ wxFontBundleBase::GetFaceForFont(const wxFontMgrFontRefData& font) const
|
||||
|
||||
int type = FaceType_Regular;
|
||||
|
||||
if ( font.GetWeight() == wxBOLD )
|
||||
if ( font.GetWeight() == wxFONTWEIGHT_BOLD )
|
||||
type |= FaceType_Bold;
|
||||
|
||||
// FIXME -- this should read "if ( font->GetStyle() == wxITALIC )",
|
||||
// FIXME -- this should read "if ( font->GetStyle() == wxFONTSTYLE_ITALIC )",
|
||||
// but since DFB doesn't support slant, we try to display it with italic
|
||||
// face (better than nothing...)
|
||||
if ( font.GetStyle() == wxITALIC || font.GetStyle() == wxSLANT )
|
||||
if ( font.GetStyle() == wxFONTSTYLE_ITALIC
|
||||
|| font.GetStyle() == wxFONTSTYLE_SLANT )
|
||||
{
|
||||
if ( HasFace((FaceType)(type | FaceType_Italic)) )
|
||||
type |= FaceType_Italic;
|
||||
|
||||
Reference in New Issue
Block a user