]> git.saurik.com Git - wxWidgets.git/commitdiff
only available on carbon or cocoa
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 9 Jun 2008 09:36:53 +0000 (09:36 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 9 Jun 2008 09:36:53 +0000 (09:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/fontenum.cpp

index 233bdf3dd8251a86f420a8b7020e048f463e3b29..ce9718ed10e84c07b042827716d5a6cefe0d1668 100644 (file)
@@ -40,6 +40,10 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
         return false;
     }
 
+    wxArrayString fontFamilies ;
+
+#if wxMAC_USE_ATSU_TEXT || wxMAC_USE_CORE_TEXT
+
     //
     // From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html
     //
@@ -48,8 +52,6 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
     ATSFontFamilyRef theATSFontFamilyRef = 0;
     OSStatus status = noErr;
 
-    wxArrayString fontFamilies ;
-
     // Create the iterator
     status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, nil,nil,
                                          kATSOptionFlagsUnRestrictedScope,
@@ -100,6 +102,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
         }
     }
     ATSFontFamilyIteratorRelease(&theFontFamilyIterator);
+#endif
 
     for ( size_t i = 0 ; i < fontFamilies.Count() ; ++i )
     {