removing code for pre 10.6 systems

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-08-09 17:02:17 +00:00
parent ae2f2a1ece
commit f71ea69505
3 changed files with 19 additions and 81 deletions

View File

@@ -45,53 +45,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
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)
//
// From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html
//
CFMutableArrayRef atsfontnames = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);;
ATSFontFamilyIterator theFontFamilyIterator = NULL;
ATSFontFamilyRef theATSFontFamilyRef = 0;
OSStatus status = noErr;
// Create the iterator
status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, nil,nil,
kATSOptionFlagsUnRestrictedScope,
&theFontFamilyIterator );
while (status == noErr)
{
// Get the next font in the iteration.
status = ATSFontFamilyIteratorNext( theFontFamilyIterator, &theATSFontFamilyRef );
if(status == noErr)
{
CFStringRef theName = NULL;
ATSFontFamilyGetName(theATSFontFamilyRef, kATSOptionFlagsDefault, &theName);
CFArrayAppendValue(atsfontnames, theName);
CFRelease(theName);
}
else if (status == kATSIterationScopeModified) // Make sure the font database hasn't changed.
{
// reset the iterator
status = ATSFontFamilyIteratorReset (kATSFontContextLocal, nil, nil,
kATSOptionFlagsUnRestrictedScope,
&theFontFamilyIterator);
CFArrayRemoveAllValues(atsfontnames);
}
}
ATSFontFamilyIteratorRelease(&theFontFamilyIterator);
cfFontFamilies = atsfontnames;
#endif
}
cfFontFamilies = CTFontManagerCopyAvailableFontFamilyNames();
#elif wxOSX_USE_IPHONE
cfFontFamilies = CopyAvailableFontFamilyNames();
#endif