[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:
@@ -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
|
||||
|
Reference in New Issue
Block a user