mirror of
https://github.com/fltk/fltk.git
synced 2026-05-20 12:41:27 +08:00
The ATSU API (old API for text formatting) has been removed from SDK 10.11.
This fixes STR#3262 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Mac header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -71,6 +71,9 @@ typedef CGContextRef Fl_Offscreen;
|
||||
#ifndef MAC_OS_X_VERSION_10_10
|
||||
#define MAC_OS_X_VERSION_10_10 101000
|
||||
#endif
|
||||
#ifndef MAC_OS_X_VERSION_10_11
|
||||
#define MAC_OS_X_VERSION_10_11 101100
|
||||
#endif
|
||||
|
||||
#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
|
||||
#if defined(__LP64__) && __LP64__
|
||||
|
||||
+8
-6
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// MacOS font selection routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -30,6 +30,8 @@ static CFMutableDictionaryRef attributes = NULL;
|
||||
#endif
|
||||
|
||||
const int Fl_X::CoreText_threshold = 100500; // this represents Mac OS 10.5
|
||||
// condition when the ATSU API is available at compile time
|
||||
#define HAS_ATSU (!__LP64__) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11
|
||||
|
||||
Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
|
||||
next = 0;
|
||||
@@ -89,7 +91,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
#if ! __LP64__
|
||||
#if HAS_ATSU
|
||||
OSStatus err;
|
||||
// fill our structure with a few default values
|
||||
ascent = Size*3/4.;
|
||||
@@ -144,7 +146,7 @@ else {
|
||||
// cause ATSU to find a suitable font to render any chars the current font can't do...
|
||||
ATSUSetTransientFontMatching (layout, true);
|
||||
# endif
|
||||
#endif//__LP64__
|
||||
#endif//HAS_ATSU
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||
}
|
||||
#endif
|
||||
@@ -387,7 +389,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
|
||||
return retval;
|
||||
} else {
|
||||
#endif
|
||||
#if ! __LP64__
|
||||
#if HAS_ATSU
|
||||
OSStatus err;
|
||||
Fixed bBefore, bAfter, bAscent, bDescent;
|
||||
ATSUTextLayout layout;
|
||||
@@ -465,7 +467,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
#if ! __LP64__
|
||||
#if HAS_ATSU
|
||||
OSStatus err;
|
||||
ATSUTextLayout layout;
|
||||
ByteCount iSize;
|
||||
@@ -533,7 +535,7 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Graphics_Dr
|
||||
CFRelease(ctline);
|
||||
} else {
|
||||
#endif
|
||||
#if ! __LP64__
|
||||
#if HAS_ATSU
|
||||
OSStatus err;
|
||||
// now collect our ATSU resources
|
||||
ATSUTextLayout layout = driver->font_descriptor()->layout;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// MacOS font utilities for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2011 by Bill Spitzak and others.
|
||||
// Copyright 1998-2015 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -137,7 +137,7 @@ if(fl_mac_os_version >= Fl_X::CoreText_threshold) {
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
#if ! __LP64__
|
||||
#if (!__LP64__) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11
|
||||
ItemCount oFontCount, oCountAgain;
|
||||
ATSUFontID *oFontIDs;
|
||||
// How many fonts?
|
||||
|
||||
Reference in New Issue
Block a user