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
}
{
}
+void wxFont::DoSetNativeFontInfo(const wxNativeFontInfo& info)
+{
+ UnRef();
+
+ m_refData = new wxFontRefData( info);
+}
+
+
bool wxFont::RealizeResource()
{
M_FONTDATA->MacFindFont();
#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
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