#include "wx/fontutil.h"
#include "wx/graphics.h"
-#include "wx/mac/private.h"
+#include "wx/mac/uma.h"
#ifndef __DARWIN__
#include <ATSUnicode.h>
m_faceName = faceName;
m_encoding = encoding;
m_noAA = false;
-#ifdef wxMAC_USE_CORE_TEXT
+#if wxMAC_USE_CORE_TEXT
m_macUIFontType = kCTFontNoFontType;
#endif
#if wxMAC_USE_ATSU_TEXT
wxFontRefData::~wxFontRefData()
{
+#if wxMAC_USE_ATSU_TEXT
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
m_macATSUStyle = NULL ;
}
+#endif
}
#if wxMAC_USE_CORE_TEXT
void wxFontRefData::MacFindFont()
{
- OSStatus status = noErr;
#if wxMAC_USE_CORE_TEXT
- if ( CTFontCreateWithName != NULL )
+ if ( UMAGetSystemVersion() >= 0x1050 )
{
if ( m_faceName.empty() && m_family == wxDEFAULT && m_macUIFontType == kCTFontNoFontType )
{
#endif
#if wxMAC_USE_ATSU_TEXT
{
+ OSStatus status = noErr;
Str255 qdFontName ;
if ( m_macThemeFontID != kThemeCurrentPortFont )
{
bool wxFont::MacCreateThemeFont(wxUint16 themeFontID)
{
#if wxMAC_USE_CORE_TEXT
- if ( HIThemeGetUIFontType != NULL )
+ if ( UMAGetSystemVersion() >= 0x1050)
{
return MacCreateUIFont(HIThemeGetUIFontType(themeFontID));
}
#endif
-#if wxMAC_USE_CORE_TEXT
+#if wxMAC_USE_ATSU_TEXT
{
UnRef();
M_FONTDATA->m_macThemeFontID = themeFontID ;
RealizeResource();
+ return true;
}
- return true;
#endif
+ return false;
}
wxFont::~wxFont()