Better OS X version backwards compatibility of executables.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7025 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2010-01-24 08:48:35 +00:00
parent 092c86c704
commit e8c9f9eaa1
+7 -3
View File
@@ -61,10 +61,14 @@ static int fl_free_font = FL_FREE_FONT;
Fl_Font Fl::set_fonts(const char* xstarname) {
#pragma unused ( xstarname )
#if defined(__APPLE_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if(CTFontCreateWithFontDescriptor != NULL) {
static SInt32 MACsystemVersion = 0;
if(MACsystemVersion == 0) Gestalt(gestaltSystemVersion, &MACsystemVersion);
if(MACsystemVersion >= 0x1050) {
//if(CTFontCreateWithFontDescriptor != NULL) {// CTFontCreateWithFontDescriptor != NULL on 10.4 also!
int value[1] = {1};
CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)kCTFontCollectionRemoveDuplicatesOption,
(const void **)&value, 1, NULL, NULL);
CFDictionaryRef dict = CFDictionaryCreate(NULL,
(const void **)kCTFontCollectionRemoveDuplicatesOption,
(const void **)&value, 1, NULL, NULL);
CTFontCollectionRef fcref = CTFontCollectionCreateFromAvailableFonts(dict);
CFRelease(dict);
CFArrayRef arrayref = CTFontCollectionCreateMatchingFontDescriptors(fcref);