#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/utils.h"
+ #include "wx/intl.h"
+ #include "wx/gdicmn.h"
#endif
#include "wx/fontutil.h"
-#include "wx/gdicmn.h"
-#include "wx/utils.h"
#include "wx/fontutil.h"
#include "wx/mac/private.h"
void wxFontRefData::MacFindFont()
{
OSStatus status ;
-
+
Str255 qdFontName ;
if ( m_macThemeFontID != kThemeCurrentPortFont )
{
if ( m_macFontStyle & underline )
m_underlined = true ;
m_pointSize = m_macFontSize ;
-
+
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
}
else
{
wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
+ wxASSERT_MSG( atsfamily != (ATSFontFamilyRef) -1 , wxT("ATSFontFamilyFindFromName failed") );
m_macFontFamily = FMGetFontFamilyFromATSFontFamilyRef( atsfamily );
}
}
wxASSERT_MSG( status == noErr , wxT("couldn't get an ATSUFont from font family") );
m_macATSUAdditionalQDStyles = m_macFontStyle & (~intrinsicStyle );
-
+
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
RealizeResource();
}
-void wxFont::SetFaceName(const wxString& faceName)
+bool wxFont::SetFaceName(const wxString& faceName)
{
Unshare();
M_FONTDATA->m_faceName = faceName;
RealizeResource();
+
+ return wxFontBase::SetFaceName(faceName);
}
void wxFont::SetUnderlined(bool underlined)