Add some stubs for missing symbols in CoreText

This commit is contained in:
Daniel Gretarsson 2023-03-17 11:17:39 +00:00
parent 1af135a557
commit ccd8c204e1
22 changed files with 612 additions and 26 deletions

View File

@ -17,6 +17,14 @@ include_directories(
set(CoreText_sources
CTFont.m
CTParagraphStyle.m
CTStringATtributes.m
CTFontCollection.m
CTFontDescriptor.m
CTFontManager.m
CTFrame.m
CTFrameSetter.m
CTLine.m
CTRun.m
KTFont.m
KTFont_FT.m
constants.c

View File

@ -19,6 +19,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#import <CoreText/CTFont.h>
#import <CoreText/KTFont.h>
#import <CoreText/CoreText.h>
const CFStringRef kCTFontStyleNameKey = "CTFontSubFamilyName";
CTFontRef
CTFontCreateWithGraphicsFont(CGFontRef cgFont, CGFloat size,
@ -105,7 +108,45 @@ CGPathRef CTFontCreatePathForGlyph(CTFontRef self, CGGlyph glyph,
return (CGPathRef) [self createPathForGlyph: glyph transform: xform];
}
CFArrayRef CTFontCopyAvailableTables(CTFontRef font, CTFontTableOptions options) {
CFArrayRef CTFontCopyAvailableTables(CTFontRef font, CTFontTableOptions options)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFTypeRef CTFontCopyAttribute(CTFontRef font, CFStringRef attribute)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CGFontRef CTFontCopyGraphicsFont(CTFontRef font, CTFontDescriptorRef _Nullable *attributes)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFStringRef CTFontCopyPostScriptName(CTFontRef font)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTFontRef CTFontCreateCopyWithAttributes(CTFontRef font, CGFloat size, const CGAffineTransform *matrix, CTFontDescriptorRef attributes)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTFontRef CTFontCreateWithName(CFStringRef name, CGFloat size, const CGAffineTransform *matrix)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFStringRef _Nullable CTFontCopyName(CTFontRef font, CFStringRef nameKey)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}

View File

@ -0,0 +1,14 @@
#import <CoreText/CTFontCollection.h>
CFArrayRef _Nullable CTFontCollectionCreateMatchingFontDescriptors(CTFontCollectionRef collection)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTFontCollectionRef CTFontCollectionCreateWithFontDescriptors(CFArrayRef _Nullable queryDescriptors,
CFDictionaryRef _Nullable options)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}

View File

@ -0,0 +1,7 @@
#import <CoreText/CTFontDescriptor.h>
CFTypeRef CTFontDescriptorCopyAttribute(CTFontDescriptorRef descriptor, CFStringRef attribute)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}

25
CoreText/CTFontManager.m Normal file
View File

@ -0,0 +1,25 @@
#import <CoreText/CTFontManager.h>
bool CTFontManagerRegisterGraphicsFont(CGFontRef font, CFErrorRef* error)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
bool CTFontManagerUnregisterGraphicsFont(CGFontRef font, CFErrorRef *error)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFArrayRef CTFontManagerCopyAvailableFontFamilyNames(void)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
bool CTFontManagerRegisterFontsForURL(CFURLRef fontURL, CTFontManagerScope scope, CFErrorRef * error)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return false;
}

41
CoreText/CTFrame.m Normal file
View File

@ -0,0 +1,41 @@
#import <CoreText/CTFrame.h>
CFRange CTFrameGetStringRange(CTFrameRef frame)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CFRangeMake(0, 0);
}
CFRange CTFrameGetVisibleStringRange(CTFrameRef frame)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CFRangeMake(0, 0);
}
CGPathRef CTFrameGetPath(CTFrameRef frame)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFDictionaryRef _Nullable CTFrameGetFrameAttributes(CTFrameRef frame)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFArrayRef CTFrameGetLines(CTFrameRef frame)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
void CTFrameGetLineOrigins(CTFrameRef frame, CFRange range, CGPoint origins[_Nonnull])
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
void CTFrameDraw(CTFrameRef frame, CGContextRef context)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}

44
CoreText/CTFrameSetter.m Normal file
View File

@ -0,0 +1,44 @@
#import <CoreText/CTFrameSetter.h>
CFTypeID CTFramesetterGetTypeID(void)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return 0;
}
CTFramesetterRef CTFramesetterCreateWithTypesetter(CTTypesetterRef typesetter)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTFramesetterRef CTFramesetterCreateWithAttributedString(CFAttributedStringRef attrString)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTFrameRef CTFramesetterCreateFrame(CTFramesetterRef framesetter,
CFRange stringRange,
CGPathRef path,
CFDictionaryRef frameAttributes)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTTypesetterRef CTFramesetterGetTypesetter(CTFramesetterRef framesetter)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CGSize CTFramesetterSuggestFrameSizeWithConstraints(CTFramesetterRef framesetter,
CFRange stringRange,
CFDictionaryRef frameAttributes,
CGSize constraints,
CFRange *fitRange)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CGSizeZero;
}

93
CoreText/CTLine.m Normal file
View File

@ -0,0 +1,93 @@
#import <CoreText/CTLine.h>
CFTypeID CTLineGetTypeID(void)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return 0;
}
CTLineRef CTLineCreateWithAttributedString(CFAttributedStringRef attrString)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTLineRef CTLineCreateTruncatedLine(CTLineRef line, double width,
CTLineTruncationType truncationType,
CTLineRef truncationToken)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTLineRef CTLineCreateJustifiedLine(CTLineRef line, CGFloat justificationFactor, double justificationWidth)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFIndex CTLineGetGlyphCount(CTLineRef line)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1;
}
CFArrayRef CTLineGetGlyphRuns(CTLineRef line)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CFRange CTLineGetStringRange(CTLineRef line)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CFRangeMake(0, 0);
}
double CTLineGetPenOffsetForFlush(CTLineRef line, CGFloat flushFactor, double flushWidth)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1.0;
}
void CTLineDraw(CTLineRef line, CGContextRef context)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
double CTLineGetTypographicBounds(CTLineRef line, CGFloat *ascent, CGFloat *descent, CGFloat *leading)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1.0;
}
CGRect CTLineGetBoundsWithOptions(CTLineRef line, CTLineBoundsOptions options)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CGRectMake(0, 0, 0, 0);
}
double CTLineGetTrailingWhitespaceWidth(CTLineRef line)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1.0;
}
CGRect CTLineGetImageBounds(CTLineRef line, CGContextRef context)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CGRectMake(0, 0, 0, 0);
}
CFIndex CTLineGetStringIndexForPosition(CTLineRef line, CGPoint position)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1;
}
CGFloat CTLineGetOffsetForStringIndex(CTLineRef line, CFIndex charIndex, CGFloat *secondaryOffset)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1.0f;
}

103
CoreText/CTRun.m Normal file
View File

@ -0,0 +1,103 @@
#import <CoreText/CTRun.h>
CFTypeID CTRunGetTypeID(void)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return 0;
}
CFIndex CTRunGetGlyphCount(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1;
}
CFDictionaryRef CTRunGetAttributes(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
CTRunStatus CTRunGetStatus(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return 0;
}
const CGGlyph * CTRunGetGlyphsPtr(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
void CTRunGetGlyphs(CTRunRef run, CFRange range, CGGlyph *buffer)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
const CGPoint * CTRunGetPositionsPtr(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
void CTRunGetPositions(CTRunRef run, CFRange range, CGPoint *buffer)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
const CGSize * CTRunGetAdvancesPtr(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
void CTRunGetAdvances(CTRunRef run, CFRange range, CGSize *buffer)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
const CFIndex * CTRunGetStringIndicesPtr(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return nil;
}
void CTRunGetStringIndices(CTRunRef run, CFRange range, CFIndex *buffer)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
CFRange CTRunGetStringRange(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CFRangeMake(0, 0);
}
double CTRunGetTypographicBounds(CTRunRef run, CFRange range, CGFloat *ascent, CGFloat *descent, CGFloat *leading)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return -1.0;
}
CGRect CTRunGetImageBounds(CTRunRef run, CGContextRef context, CFRange range)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CGRectMake(0, 0, 0, 0);
}
CGAffineTransform CTRunGetTextMatrix(CTRunRef run)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
return CGAffineTransformIdentity;
}
void CTRunGetBaseAdvancesAndOrigins(CTRunRef runRef, CFRange range, CGSize *advancesBuffer, CGPoint *originsBuffer)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}
void CTRunDraw(CTRunRef run, CGContextRef context, CFRange range)
{
printf("STUB %s\n", __PRETTY_FUNCTION__);
}

View File

@ -0,0 +1,4 @@
#import <CoreText/CTStringAttributes.h>
const CFStringRef kCTLigatureAttributeName = "NSLigature";
const CFStringRef kCTUnderlineStyleAttributeName = "NSUnderline";

View File

@ -20,6 +20,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#import <CoreGraphics/CGFont.h>
#import <CoreGraphics/CGPath.h>
#import <CoreText/CoreTextExport.h>
#import <CoreText/CTFontDescriptor.h>
#import <CoreText/CTParagraphStyle.h>
typedef struct CF_BRIDGED_TYPE(id) KTFont *CTFontRef;
@ -91,4 +92,15 @@ CORETEXT_EXPORT CGPathRef CTFontCreatePathForGlyph(CTFontRef self,
CORETEXT_EXPORT CFArrayRef CTFontCopyAvailableTables(CTFontRef font, CTFontTableOptions options);
CORETEXT_EXPORT CFTypeRef CTFontCopyAttribute(CTFontRef font, CFStringRef attribute );
CORETEXT_EXPORT CGFontRef CTFontCopyGraphicsFont(CTFontRef font, CTFontDescriptorRef _Nullable *attributes);
CORETEXT_EXPORT CFStringRef CTFontCopyPostScriptName(CTFontRef font);
CORETEXT_EXPORT CTFontRef CTFontCreateCopyWithAttributes(CTFontRef font, CGFloat size,
const CGAffineTransform *matrix,
CTFontDescriptorRef attributes);
CORETEXT_EXPORT CTFontRef CTFontCreateWithName(CFStringRef name, CGFloat size,
const CGAffineTransform *matrix);
CORETEXT_EXPORT CFStringRef CTFontCopyName(CTFontRef font, CFStringRef nameKey);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,8 @@
#import <CoreFoundation/CoreFoundation.h>
#import <CoreText/CoreTextExport.h>
typedef struct __CTFontCollection* CTFontCollectionRef;
CORETEXT_EXPORT CFArrayRef CTFontCollectionCreateMatchingFontDescriptors(CTFontCollectionRef collection);
CORETEXT_EXPORT CTFontCollectionRef CTFontCollectionCreateWithFontDescriptors(CFArrayRef queryDescriptors, CFDictionaryRef options);

View File

@ -0,0 +1,10 @@
#import <CoreFoundation/CFBase.h>
#import <CoreText/CoreTextExport.h>
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTFontDescriptor* CTFontDescriptorRef;
CORETEXT_EXPORT CFTypeRef CTFontDescriptorCopyAttribute(CTFontDescriptorRef descriptor, CFStringRef attribute);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,24 @@
#import <CoreText/CTFontDescriptor.h>
#import <CoreGraphics/CoreGraphics.h>
CF_IMPLICIT_BRIDGING_ENABLED
enum
{
kCTFontManagerScopeNone = 0,
kCTFontManagerScopeProcess = 1,
kCTFontManagerScopePersistent = 2,
kCTFontManagerScopeSession = 3,
kCTFontManagerScopeUser = 2,
};
typedef uint32_t CTFontManagerScope;
CORETEXT_EXPORT bool CTFontManagerRegisterGraphicsFont(CGFontRef font, CFErrorRef* error);
CORETEXT_EXPORT bool CTFontManagerUnregisterGraphicsFont(CGFontRef font, CFErrorRef *error);
CORETEXT_EXPORT CFArrayRef CTFontManagerCopyAvailableFontFamilyNames(void);
CORETEXT_EXPORT bool CTFontManagerRegisterFontsForURL(CFURLRef fontURL, CTFontManagerScope scope, CFErrorRef * error);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,40 @@
#import <CoreText/CoreTextExport.h>
#import <CoreFoundation/CoreFoundation.h>
#import <CoreGraphics/CoreGraphics.h>
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTFrame* CTFrameRef;
CFTypeID CTFrameGetTypeID(void);
typedef uint32_t CTFrameProgression;
enum {
kCTFrameProgressionTopToBottom = 0,
kCTFrameProgressionRightToLeft = 1,
kCTFrameProgressionLeftToRight = 2
};
typedef uint32_t CTFramePathFillRule;
enum {
kCTFramePathFillEvenOdd = 0,
kCTFramePathFillWindingNumber = 1
};
CORETEXT_EXPORT const CFStringRef kCTFrameProgressionAttributeName;
CORETEXT_EXPORT const CFStringRef kCTFramePathFillRuleAttributeName;
CORETEXT_EXPORT const CFStringRef kCTFramePathWidthAttributeName;
CORETEXT_EXPORT const CFStringRef kCTFrameClippingPathsAttributeName;
CORETEXT_EXPORT const CFStringRef kCTFramePathClippingPathAttributeName;
CORETEXT_EXPORT CFRange CTFrameGetStringRange(CTFrameRef frame);
CORETEXT_EXPORT CFRange CTFrameGetVisibleStringRange(CTFrameRef frame);
CORETEXT_EXPORT CGPathRef CTFrameGetPath(CTFrameRef frame);
CORETEXT_EXPORT CFDictionaryRef CTFrameGetFrameAttributes(CTFrameRef frame);
CORETEXT_EXPORT CFArrayRef CTFrameGetLines(CTFrameRef frame);
CORETEXT_EXPORT void CTFrameGetLineOrigins(CTFrameRef frame, CFRange range, CGPoint *origins);
CORETEXT_EXPORT void CTFrameDraw(CTFrameRef frame, CGContextRef context);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,25 @@
#import <CoreText/CTFrame.h>
#import <CoreText/CTTypesetter.h>
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTFramesetter* CTFramesetterRef;
CORETEXT_EXPORT CFTypeID CTFramesetterGetTypeID(void);
CORETEXT_EXPORT CTFramesetterRef CTFramesetterCreateWithTypesetter(CTTypesetterRef typesetter);
CORETEXT_EXPORT CTFramesetterRef CTFramesetterCreateWithAttributedString(CFAttributedStringRef attrString);
CORETEXT_EXPORT CTFrameRef CTFramesetterCreateFrame(CTFramesetterRef framesetter,
CFRange stringRange,
CGPathRef path,
CFDictionaryRef frameAttributes);
CORETEXT_EXPORT CTTypesetterRef CTFramesetterGetTypesetter(CTFramesetterRef framesetter);
CORETEXT_EXPORT CGSize CTFramesetterSuggestFrameSizeWithConstraints(CTFramesetterRef framesetter,
CFRange stringRange,
CFDictionaryRef frameAttributes,
CGSize constraints,
CFRange *fitRange);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,52 @@
#import <CoreText/CoreTextExport.h>
#import <CoreGraphics/CoreGraphics.h>
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTLine* CTLineRef;
typedef CFOptionFlags CTLineBoundsOptions;
enum {
kCTLineBoundsExcludeTypographicLeading = 1 << 0,
kCTLineBoundsExcludeTypographicShifts = 1 << 1,
kCTLineBoundsUseHangingPunctuation = 1 << 2,
kCTLineBoundsUseGlyphPathBounds = 1 << 3,
kCTLineBoundsUseOpticalBounds = 1 << 4,
kCTLineBoundsIncludeLanguageExtents = 1 << 5,
};
typedef uint32_t CTLineTruncationType;
enum {
kCTLineTruncationStart = 0,
kCTLineTruncationEnd = 1,
kCTLineTruncationMiddle = 2
};
CORETEXT_EXPORT CFTypeID CTLineGetTypeID(void);
CORETEXT_EXPORT CTLineRef CTLineCreateWithAttributedString(CFAttributedStringRef attrString);
CORETEXT_EXPORT CTLineRef CTLineCreateTruncatedLine(CTLineRef line, double width,
CTLineTruncationType truncationType,
CTLineRef truncationToken);
CORETEXT_EXPORT CTLineRef _Nullable CTLineCreateJustifiedLine(CTLineRef line, CGFloat justificationFactor, double justificationWidth);
CORETEXT_EXPORT CFIndex CTLineGetGlyphCount(CTLineRef line);
CORETEXT_EXPORT CFArrayRef CTLineGetGlyphRuns(CTLineRef line);
CORETEXT_EXPORT CFRange CTLineGetStringRange(CTLineRef line);
CORETEXT_EXPORT double CTLineGetPenOffsetForFlush(CTLineRef line, CGFloat flushFactor, double flushWidth);
CORETEXT_EXPORT void CTLineDraw(CTLineRef line, CGContextRef context);
CORETEXT_EXPORT double CTLineGetTypographicBounds(CTLineRef line, CGFloat * ascent, CGFloat * descent, CGFloat * leading);
CORETEXT_EXPORT CGRect CTLineGetBoundsWithOptions(CTLineRef line, CTLineBoundsOptions options);
CORETEXT_EXPORT double CTLineGetTrailingWhitespaceWidth(CTLineRef line);
CORETEXT_EXPORT CGRect CTLineGetImageBounds(CTLineRef line, CGContextRef context);
CORETEXT_EXPORT CFIndex CTLineGetStringIndexForPosition(CTLineRef line, CGPoint position);
CORETEXT_EXPORT CGFloat CTLineGetOffsetForStringIndex(CTLineRef line, CFIndex charIndex, CGFloat *secondaryOffset);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,48 @@
#import <CoreText/CoreTextExport.h>
#import <CoreGraphics/CoreGraphics.h>
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTRun* CTRunRef;
typedef uint32_t CTRunStatus;
enum {
kCTRunStatusNoStatus = 0,
kCTRunStatusRightToLeft = (1 << 0),
kCTRunStatusNonMonotonic = (1 << 1),
kCTRunStatusHasNonIdentityMatrix = (1 << 2)
};
CORETEXT_EXPORT CFTypeID CTRunGetTypeID(void);
CORETEXT_EXPORT CFIndex CTRunGetGlyphCount(CTRunRef run);
CORETEXT_EXPORT CFDictionaryRef CTRunGetAttributes(CTRunRef run);
CORETEXT_EXPORT CTRunStatus CTRunGetStatus(CTRunRef run);
CORETEXT_EXPORT const CGGlyph * CTRunGetGlyphsPtr(CTRunRef run);
CORETEXT_EXPORT void CTRunGetGlyphs(CTRunRef run, CFRange range, CGGlyph *buffer);
CORETEXT_EXPORT const CGPoint * CTRunGetPositionsPtr(CTRunRef run);
CORETEXT_EXPORT void CTRunGetPositions(CTRunRef run, CFRange range, CGPoint *buffer);
CORETEXT_EXPORT const CGSize * CTRunGetAdvancesPtr(CTRunRef run);
CORETEXT_EXPORT void CTRunGetAdvances(CTRunRef run, CFRange range, CGSize *buffer);
CORETEXT_EXPORT const CFIndex * CTRunGetStringIndicesPtr(CTRunRef run);
CORETEXT_EXPORT void CTRunGetStringIndices(CTRunRef run, CFRange range, CFIndex *buffer);
CORETEXT_EXPORT CFRange CTRunGetStringRange(CTRunRef run);
CORETEXT_EXPORT double CTRunGetTypographicBounds(CTRunRef run, CFRange range, CGFloat *ascent, CGFloat *descent, CGFloat *leading);
CORETEXT_EXPORT CGRect CTRunGetImageBounds(CTRunRef run, CGContextRef context, CFRange range);
CORETEXT_EXPORT CGAffineTransform CTRunGetTextMatrix(CTRunRef run);
CORETEXT_EXPORT void CTRunGetBaseAdvancesAndOrigins(CTRunRef runRef, CFRange range, CGSize *advancesBuffer, CGPoint *originsBuffer);
CORETEXT_EXPORT void CTRunDraw(CTRunRef run, CGContextRef context, CFRange range);
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -0,0 +1,5 @@
#import <CoreText/CTFont.h>
CORETEXT_EXPORT const CFStringRef kCTLigatureAttributeName;
CORETEXT_EXPORT const CFStringRef kCTUnderlineStyleAttributeName;

View File

@ -0,0 +1,5 @@
CF_IMPLICIT_BRIDGING_ENABLED
typedef struct __CTTypesetter* CTTypesetterRef;
CF_IMPLICIT_BRIDGING_DISABLED

View File

@ -8,3 +8,5 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <CoreText/CTFont.h>
#import <CoreText/CTParagraphStyle.h>
#import <CoreText/CTStringAttributes.h>
#import <CoreText/CTFontCollection.h>

View File

@ -9,28 +9,3 @@ void *CTFontDescriptorCreateWithAttributes(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}
void *CTFrameDraw(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}
void *CTFrameGetLines(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}
void *CTFramesetterCreateFrame(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}
void *CTFramesetterCreateWithAttributedString(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}
void *CTLineGetTypographicBounds(void) {
printf("STUB %s\n", __PRETTY_FUNCTION__);
return NULL;
}