#include "wx/osx/private.h"
-#if wxOSX_USE_ATSU_TEXT && !wxOSX_USE_CARBON
-// include theming support
-#include <Carbon/Carbon.h>
-#endif
-
#include <map>
#include <string>
virtual ~wxFontRefData();
- void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
-
- bool GetNoAntiAliasing() const { return m_noAA; }
-
void SetPointSize( int size )
{
if( GetPointSize() != size )
#if wxOSX_USE_CORE_TEXT
// void Init( CTFontRef font );
#endif
- bool m_noAA; // No anti-aliasing
public:
bool m_fontValid;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
{
Init();
m_info = data.m_info;
- m_noAA = data.m_noAA;
m_fontValid = data.m_fontValid;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
m_macThemeFontID = data.m_macThemeFontID;
void wxFontRefData::Init()
{
- m_noAA = false;
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
m_macThemeFontID = kThemeCurrentPortFont ;
#endif
if ( m_fontValid )
return;
+ wxCHECK_RET( m_info.m_pointSize > 0, wxT("Point size should not be zero.") );
+
m_info.EnsureValid();
#if wxOSX_USE_CORE_TEXT
WXSIZEOF(atsuTags),
atsuTags, atsuSizes, atsuValues);
- wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") );
+ wxASSERT_MSG( status == noErr , wxString::Format(wxT("couldn't modify ATSU style. Status was %d"), (int) status).c_str() );
+
if ( m_cgFont.get() == NULL )
{
ATSFontRef fontRef = FMGetATSFontRefFromFont(m_info.m_atsuFontID);
M_FONTDATA->SetUnderlined( underlined );
}
-void wxFont::SetNoAntiAliasing( bool no )
-{
- AllocExclusive();
-
- M_FONTDATA->SetNoAntiAliasing( no );
-}
-
// ----------------------------------------------------------------------------
// accessors
// ----------------------------------------------------------------------------
return M_FONTDATA->GetEncoding() ;
}
-bool wxFont::GetNoAntiAliasing() const
-{
- wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") );
-
- return M_FONTDATA->GetNoAntiAliasing();
-}
-
#if wxOSX_USE_ATSU_TEXT && wxOSX_USE_CARBON
short wxFont::MacGetFontNum() const