[wxGTK2] Do what we (I) can wrt the win32 centric wxNativeFontInfo::GetFamily

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2005-08-22 23:19:57 +00:00
parent 4a767dd5cd
commit b67d14bee0
3 changed files with 68 additions and 35 deletions

View File

@@ -747,8 +747,15 @@ int wxFont::GetFamily() const
wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
#if wxUSE_PANGO
return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFamily()
: M_FONTDATA->m_family;
int ret = M_FONTDATA->m_family;
if (M_FONTDATA->HasNativeFont())
// wxNativeFontInfo::GetFamily is expensive, must not call more than once
ret = M_FONTDATA->m_nativeFontInfo.GetFamily();
if (ret == wxFONTFAMILY_DEFAULT)
ret = M_FONTDATA->m_family;
return ret;
#else
return M_FONTDATA->m_family;
#endif