]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/fontenum.cpp
adding comment
[wxWidgets.git] / src / osx / core / fontenum.cpp
index c4326e8319146ff2a129bd2fb331e8e290a4af5f..3d6c0b5c335419133b55ffc12b4be82da8bb9595 100644 (file)
 // wxFontEnumerator
 // ----------------------------------------------------------------------------
 
 // wxFontEnumerator
 // ----------------------------------------------------------------------------
 
+#if wxOSX_USE_IPHONE
+extern CFArrayRef CopyAvailableFontFamilyNames();
+#endif
+
 bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
                                           bool fixedWidthOnly)
 {
 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_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_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
             //
             //
             // 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
         }
             cfFontFamilies = atsfontnames;
 #endif
         }
+#elif wxOSX_USE_IPHONE
+        cfFontFamilies = CopyAvailableFontFamilyNames();
+#endif
         
         CFIndex count = CFArrayGetCount(cfFontFamilies);
         for(CFIndex i = 0; i < count; i++)
         
         CFIndex count = CFArrayGetCount(cfFontFamilies);
         for(CFIndex i = 0; i < count; i++)