X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63660cba0acbdefc2ac156ef74e899146d98c1c4..3678169caab0f713415414dce013a638305f3cce:/src/osx/core/fontenum.cpp?ds=inline diff --git a/src/osx/core/fontenum.cpp b/src/osx/core/fontenum.cpp index c4326e8319..3d6c0b5c33 100644 --- a/src/osx/core/fontenum.cpp +++ b/src/osx/core/fontenum.cpp @@ -31,6 +31,10 @@ // wxFontEnumerator // ---------------------------------------------------------------------------- +#if wxOSX_USE_IPHONE +extern CFArrayRef CopyAvailableFontFamilyNames(); +#endif + bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool fixedWidthOnly) { @@ -41,14 +45,15 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, #if wxOSX_USE_CORE_TEXT { CFArrayRef cfFontFamilies = nil; - + +#if wxOSX_USE_COCOA_OR_CARBON #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) if ( UMAGetSystemVersion() >= 0x1060 ) cfFontFamilies = CTFontManagerCopyAvailableFontFamilyNames(); else #endif { -#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) && wxOSX_USE_ATSU_TEXT +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) // // From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html // @@ -89,6 +94,9 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, cfFontFamilies = atsfontnames; #endif } +#elif wxOSX_USE_IPHONE + cfFontFamilies = CopyAvailableFontFamilyNames(); +#endif CFIndex count = CFArrayGetCount(cfFontFamilies); for(CFIndex i = 0; i < count; i++)