diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index f53c0138ca..dd3d6d4222 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -883,6 +883,20 @@ NSFont* wxFont::OSXGetNSFont() const #endif +#if wxOSX_USE_IPHONE + +UIFont* wxFont::OSXGetUIFont() const +{ + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); + + // cast away constness otherwise lazy font resolution is not possible + const_cast(this)->RealizeResource(); + + return (M_FONTDATA->m_uiFont); +} + +#endif + const wxNativeFontInfo * wxFont::GetNativeFontInfo() const { wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );