-
Notifications
You must be signed in to change notification settings - Fork 518
CoreText macOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Jul 11, 2024
·
3 revisions
#CoreText.framework https://github.com/xamarin/xamarin-macios/pull/20878
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h 2024-04-14 19:03:52
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h 2024-05-30 02:56:44
@@ -10,7 +10,7 @@
#define __CTDEFINES__
#include <TargetConditionals.h>
-#include <Availability.h>
+#include <os/availability.h>
#ifndef __has_feature
# define __has_feature(x) 0
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h 2024-04-14 19:03:52
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFont.h 2024-05-30 10:39:20
@@ -2,7 +2,7 @@
* CTFont.h
* CoreText
*
- * Copyright (c) 2006-2022 Apple Inc. All rights reserved.
+ * Copyright (c) 2006-2024 Apple Inc. All rights reserved.
*
*/
@@ -641,6 +641,20 @@
*/
CFDictionaryRef CTFontCopyTraits( CTFontRef font ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
+/*!
+ @function CTFontCopyDefaultCascadeListForLanguages
+ @abstract Return an ordered list of CTFontDescriptorRef's for font fallback derived from the system default fallback according to the given language preferences, making a reasonable attempt to match the given font's style, weight, and width.
+
+ @param font
+ The font reference.
+
+ @param languagePrefList
+ An array of language identifiers as CFString values, in decreasing order of preference.
+
+ @result The ordered list of fallback fonts - ordered array of CTFontDescriptors.
+*/
+CFArrayRef _Nullable CTFontCopyDefaultCascadeListForLanguages( CTFontRef font, CFArrayRef _Nullable languagePrefList ) CT_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
+
/*! --------------------------------------------------------------------------
@group Font Names
*///--------------------------------------------------------------------------
@@ -1633,19 +1647,64 @@
CT_EXPORT const CFStringRef kCTBaselineOriginalFont CT_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
+/*! --------------------------------------------------------------------------
+ @group Adaptive Image Glyphs
+*///--------------------------------------------------------------------------
+
+#if defined(__OBJC__)
+@protocol CTAdaptiveImageProviding;
+#endif
+
/*!
- @function CTFontCopyDefaultCascadeListForLanguages
- @abstract Return an ordered list of CTFontDescriptorRef's for font fallback derived from the system default fallback region according to the given language preferences. The style of the given is also matched as well as the weight and width of the font is not one of the system UI font, otherwise the UI font fallback is applied.
+ @function CTFontGetTypographicBoundsForAdaptiveImageProvider
+ @abstract Returns metrics needed by clients performing their own typesetting of an adaptive image glyph.
+ @discussion Adaptive image glyphs are handled automatically when using an attributed string with system frameworks.
+ Clients performing their own typesetting can use this function to calculate the appropriate metrics for an adaptive image glyph,
+ including the ascent and descent to be used instead of those applicable to the font on its own.
+
@param font
- The font reference.
-
- @param languagePrefList
- The language preference list - ordered array of CFStringRef's of ISO language codes.
+ The effective font in the range containing the adaptive image glyph.
- @result The ordered list of fallback fonts - ordered array of CTFontDescriptors.
+ @param provider
+ An object conforming to the CTAdaptiveImageProviding protocol. Default results will be returned in the absence of a provider, on the assumption an image is not yet available.
+
+ @result The typographic bounds in points expressed as a rect whose width corresponds to the advance width, maximum Y corresponds to the ascent (above the baseline), and minimum Y corresponds to the descent (below the baseline).
+
+ @seealso CTAdaptiveImageProviding
*/
-CFArrayRef _Nullable CTFontCopyDefaultCascadeListForLanguages( CTFontRef font, CFArrayRef _Nullable languagePrefList ) CT_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
+#if defined(__OBJC__)
+CGRect CTFontGetTypographicBoundsForAdaptiveImageProvider(CTFontRef font, id<CTAdaptiveImageProviding> _Nullable provider) CT_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
+#else
+CGRect CTFontGetTypographicBoundsForAdaptiveImageProvider(CTFontRef font, CFTypeRef _Nullable provider) CT_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
+#endif
+
+/*!
+ @function CTFontDrawImageFromAdaptiveImageProviderAtPoint
+ @abstract Draws the image for a font and adaptive image provider.
+
+ @discussion Adaptive image glyphs are handled automatically when using an attributed string with system frameworks.
+ Clients performing their own typesetting can use this function to display an adaptive image glyph at the given point.
+
+ @param font
+ The effective font in the range containing the adaptive image glyph.
+
+ @param provider
+ An object conforming to the CTAdaptiveImageProviding protocol.
+
+ @param point
+ The position relative to which the adaptive image glyph will be drawn.
+
+ @param context
+ The context in which the adaptive image glyph will be drawn.
+
+ @seealso CTAdaptiveImageProviding
+*/
+#if defined(__OBJC__)
+void CTFontDrawImageFromAdaptiveImageProviderAtPoint(CTFontRef font, id<CTAdaptiveImageProviding> provider, CGPoint point, CGContextRef context) CT_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
+#else
+void CTFontDrawImageFromAdaptiveImageProviderAtPoint(CTFontRef font, CFTypeRef provider, CGPoint point, CGContextRef context) CT_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
+#endif
CF_ASSUME_NONNULL_END
CF_EXTERN_C_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h 2024-03-22 20:07:32
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h 2024-05-30 04:35:38
@@ -2,7 +2,7 @@
* CTFontManager.h
* CoreText
*
- * Copyright (c) 2008-2022 Apple Inc. All rights reserved.
+ * Copyright (c) 2008-2024 Apple Inc. All rights reserved.
*
*/
@@ -190,8 +190,9 @@
/*!
@function CTFontManagerRegisterGraphicsFont
@abstract Registers the specified graphics font with the font manager. Registered fonts participate in font descriptor matching.
- Attempts to register a font that is either already registered or contains the same PostScript name of an already registered font will fail.
- This functionality is useful for fonts that may be embedded in documents or present/constructed in memory. A graphics font is obtained
+
+ @discussion Attempts to register a font that is either already registered or contains the same PostScript name of an already registered font will fail.
+ This functionality is intended for fonts that may be embedded in documents or present/constructed in memory. A graphics font is obtained
by calling CGFontCreateWithDataProvider. Fonts that are backed by files should be registered using CTFontManagerRegisterFontsForURL.
@param font
@@ -204,8 +205,8 @@
*/
bool CTFontManagerRegisterGraphicsFont(
CGFontRef font,
- CFErrorRef * error ) CT_AVAILABLE(macos(10.8), ios(4.1), watchos(2.0), tvos(9.0));
-
+ CFErrorRef * error ) CT_DEPRECATED("Use CTFontManagerCreateFontDescriptorsFromData or CTFontManagerRegisterFontsForURL", macos(10.8, 15), ios(4.1, 18), watchos(2, 11), tvos(9, 18));
+
/*!
@function CTFontManagerUnregisterGraphicsFont
@abstract Unregisters the specified graphics font with the font manager. Unregistered fonts do not participate in font descriptor matching.
@@ -220,7 +221,7 @@
*/
bool CTFontManagerUnregisterGraphicsFont(
CGFontRef font,
- CFErrorRef * error ) CT_AVAILABLE(macos(10.8), ios(4.1), watchos(2.0), tvos(9.0));
+ CFErrorRef * error ) CT_DEPRECATED("Use the API corresponding to the one used to register the font", macos(10.8, 15), ios(4.1, 18), watchos(2, 11), tvos(9, 18));
/*!
@function CTFontManagerRegisterFontsForURLs
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h 2024-03-22 20:07:32
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTRunDelegate.h 2024-05-30 02:56:44
@@ -2,7 +2,7 @@
* CTRunDelegate.h
* CoreText
*
- * Copyright (c) 2006-2018 Apple Inc. All rights reserved.
+ * Copyright (c) 2006-2024 Apple Inc. All rights reserved.
*
*/
@@ -190,6 +190,18 @@
void * CTRunDelegateGetRefCon(
CTRunDelegateRef runDelegate ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0));
+
+#pragma mark -
+
+#if defined(__OBJC__)
+
+@protocol CTAdaptiveImageProviding
+/* The callee is to return an image for use at a particular point size and scale factor, as well as its offset and size (in points), which define the placement of the returned image relative to a rect with the proposed size.
+ */
+- (CGImageRef _Nullable)imageForProposedSize:(CGSize)proposedSize scaleFactor:(CGFloat)scaleFactor imageOffset:(out CGPoint * _Nonnull)outImageOffset imageSize:(out CGSize * _Nonnull)outImageSize CF_RETURNS_NOT_RETAINED;
+@end
+
+#endif // defined(__OBJC__)
CF_ASSUME_NONNULL_END
CF_EXTERN_C_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h 2024-03-22 20:07:32
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTStringAttributes.h 2024-05-30 05:13:52
@@ -479,6 +479,17 @@
CT_EXPORT const CFStringRef kCTRubyAnnotationAttributeName CT_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
+/*!
+ @const kCTAdaptiveImageProviderAttributeName
+ @abstract Provide the image for an emoji-like text attachment.
+
+ @discussion The attribute value must be an object conforming to the CTAdaptiveImageProviding protocol.
+ The range this attribute is applied to should be one or more U+FFFC characters, each of which will be drawn as the provided image,
+ and the font attribute applied to that range will be used to determine properties such as point size.
+*/
+CT_EXPORT const CFStringRef kCTAdaptiveImageProviderAttributeName CT_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
+
+
CF_ASSUME_NONNULL_END
CF_EXTERN_C_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h 2024-04-14 19:19:13
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h 2024-05-30 05:13:52
@@ -10,7 +10,7 @@
#define __SFNTLAYOUTTYPES__
#include <TargetConditionals.h>
-#include <Availability.h>
+#include <os/availability.h>
#if !TARGET_OS_WIN32
#include <MacTypes.h>
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status