Exemplo n.º 1
0
    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;
    }
Exemplo n.º 2
0
    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;
    }