wxString GetFaceName() const { wxString facename = m_nativeFontInfo.GetFaceName(); if ( facename.empty() ) { facename = GetMSWFaceName(); if ( !facename.empty() ) { // cache the face name, it shouldn't change unless the family // does and wxNativeFontInfo::SetFamily() resets the face name const_cast<wxFontRefData *>(this)->SetFaceName(facename); } } return facename; }
wxString GetFaceName() const { wxString facename = m_nativeFontInfo.GetFaceName(); if ( facename.empty() ) { facename = GetMSWFaceName(); if ( !facename.empty() ) { // cache the face name, it shouldn't change unless the family // does and wxNativeFontInfo::SetFamily() resets the face name // Don't call this->SetFaceName(), because it deletes the HFONT. const_cast<wxNativeFontInfo &>(m_nativeFontInfo).SetFaceName(facename); } } return facename; }