m_nsFont = (NSFont*) wxMacCocoaRetain(data.m_nsFont);
#endif
#if wxOSX_USE_IPHONE
- m_uiFont = wxMacCocoaRetain(data.m_uiFont);
+ m_uiFont = (UIFont*) wxMacCocoaRetain(data.m_uiFont);
#endif
}
}
#endif
#if wxOSX_USE_COCOA
- m_nsFont = wxFont::CreateNSFont( font, &m_info );
+ m_nsFont = wxFont::OSXCreateNSFont( font, &m_info );
#endif
#if wxOSX_USE_IPHONE
- m_uiFont = wxFont::CreateUIFont( font, &m_info );
+ m_uiFont = wxFont::OSXCreateUIFont( font, &m_info );
#endif
}
}
#endif
#if wxOSX_USE_COCOA
- m_nsFont = wxFont::CreateNSFont( &m_info );
+ m_nsFont = wxFont::OSXCreateNSFont( &m_info );
#endif
#if wxOSX_USE_IPHONE
- m_uiFont = wxFont::CreateUIFont( &m_info );
+ m_uiFont = wxFont::OSXCreateUIFont( &m_info );
#endif
m_fontValid = true;
}
{
}
+void wxFont::DoSetNativeFontInfo(const wxNativeFontInfo& info)
+{
+ UnRef();
+
+ m_refData = new wxFontRefData( info);
+}
+
+
bool wxFont::RealizeResource()
{
M_FONTDATA->MacFindFont();
#if wxOSX_USE_CORE_TEXT
-CTFontRef wxFont::GetCTFont() const
+CTFontRef wxFont::OSXGetCTFont() const
{
wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
#if wxOSX_USE_COCOA_OR_CARBON
-CGFontRef wxFont::GetCGFont() const
+CGFontRef wxFont::OSXGetCGFont() const
{
wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
#if wxOSX_USE_COCOA
-NSFont* wxFont::GetNSFont() const
+NSFont* wxFont::OSXGetNSFont() const
{
wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
#endif
#if wxOSX_USE_COCOA
m_nsFontDescriptor = NULL;
-#endif
-#if wxOSX_USE_IPHONE
- m_uiFontDescriptor = NULL;
#endif
m_pointSize = 0;
m_family = wxFONTFAMILY_DEFAULT;
m_weight = wxFONTWEIGHT_NORMAL;
m_underlined = false;
m_faceName.clear();
- m_encoding = wxFONTENCODING_DEFAULT;
+ m_encoding = wxFont::GetDefaultEncoding();
m_descriptorValid = false;
}
#endif
#if wxOSX_USE_COCOA
if ( m_nsFontDescriptor == NULL )
- ValidateNSFontDescriptor();
+ OSXValidateNSFontDescriptor();
#endif
#if wxOSX_USE_IPHONE
// TODO
#endif
#if wxOSX_USE_COCOA
m_nsFontDescriptor = (NSFontDescriptor*) wxMacCocoaRetain(info.m_nsFontDescriptor);
-#endif
-#if wxOSX_USE_IPHONE
- m_uiFontDescriptor = wxMacCocoaRetain(info.m_uiFontDescriptor);;
#endif
m_pointSize = info.m_pointSize;
m_family = info.m_family;
m_weight = weight;
m_underlined = underlined;
m_faceName = faceName;
+ if ( encoding == wxFONTENCODING_DEFAULT )
+ encoding = wxFont::GetDefaultEncoding();
m_encoding = encoding;
}
#if wxOSX_USE_COCOA
wxMacCocoaRelease(m_nsFontDescriptor);
m_nsFontDescriptor = NULL;
-#endif
-#if wxOSX_USE_IPHONE
- wxMacCocoaRelease(m_uiFontDescriptor);
- m_uiFontDescriptor = NULL
#endif
m_descriptorValid = false;
}
void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)
{
+ if ( encoding_ == wxFONTENCODING_DEFAULT )
+ encoding_ = wxFont::GetDefaultEncoding();
m_encoding = encoding_;
// not reflected in native descriptors
}
\ No newline at end of file