cgGlyph
TypeScriptcgGlyphAt(glyphIndex: number): numberSwift declarationfunc cgGlyph(at glyphIndex: Int) -> CGGlyphclass · iOS 7.0+ · SDK 27.1
class NSLayoutManagercgGlyphAt(glyphIndex: number): numberSwift declarationfunc cgGlyph(at glyphIndex: Int) -> CGGlyphcgGlyphAtIsValidIndex(glyphIndex: number): { $ret: number; $out: { "isValidIndex": boolean } }Swift declarationfunc cgGlyph(at glyphIndex: Int, isValidIndex: UnsafeMutablePointer<ObjCBool>?) -> CGGlyphOmit the output parameters from the call. The result contains $ret and $out, with isValidIndex inside $out.
addTextContainer(container: NSTextContainer): voidSwift declarationfunc addTextContainer(_ container: NSTextContainer)attachmentSize(glyphIndex: number): { width: number; height: number }Swift declarationfunc attachmentSize(forGlyphAt glyphIndex: Int) -> CGSizeboundingRect(glyphRange: SDKHandle, container: NSTextContainer): { x: number; y: number; width: number; height: number }Swift declarationfunc boundingRect(forGlyphRange glyphRange: NSRange, in container: NSTextContainer) -> CGRectcharacterIndexForGlyph(glyphIndex: number): numberSwift declarationfunc characterIndexForGlyph(at glyphIndex: Int) -> IntcharacterIndex(point: { x: number; y: number }, container: NSTextContainer, partialFraction?: ("animatableData" | SDKHandle) | null): numberSwift declarationfunc characterIndex(for point: CGPoint, in container: NSTextContainer, fractionOfDistanceBetweenInsertionPoints partialFraction: UnsafeMutablePointer<CGFloat>?) -> IntcharacterRange(glyphRange: SDKHandle, actualGlyphRange?: (SDKHandle) | null): SDKHandleSwift declarationfunc characterRange(forGlyphRange glyphRange: NSRange, actualGlyphRange: NSRangePointer?) -> NSRangedrawBackground(glyphsToShow: SDKHandle, origin: { x: number; y: number }): voidSwift declarationfunc drawBackground(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint)drawGlyphs(glyphsToShow: SDKHandle, origin: { x: number; y: number }): voidSwift declarationfunc drawGlyphs(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint)drawStrikethrough(glyphRange: SDKHandle, strikethroughVal: NSUnderlineStyle, baselineOffset: number, lineRect: { x: number; y: number; width: number; height: number }, lineGlyphRange: SDKHandle, containerOrigin: { x: number; y: number }): voidSwift declarationfunc drawStrikethrough(forGlyphRange glyphRange: NSRange, strikethroughType strikethroughVal: NSUnderlineStyle, baselineOffset: CGFloat, lineFragmentRect lineRect: CGRect, lineFragmentGlyphRange lineGlyphRange: NSRange, containerOrigin: CGPoint)drawUnderline(glyphRange: SDKHandle, underlineVal: NSUnderlineStyle, baselineOffset: number, lineRect: { x: number; y: number; width: number; height: number }, lineGlyphRange: SDKHandle, containerOrigin: { x: number; y: number }): voidSwift declarationfunc drawUnderline(forGlyphRange glyphRange: NSRange, underlineType underlineVal: NSUnderlineStyle, baselineOffset: CGFloat, lineFragmentRect lineRect: CGRect, lineFragmentGlyphRange lineGlyphRange: NSRange, containerOrigin: CGPoint)drawsOutsideLineFragment(glyphIndex: number): booleanSwift declarationfunc drawsOutsideLineFragment(forGlyphAt glyphIndex: Int) -> BoolensureGlyphsForCharacterRange(charRange: SDKHandle): voidSwift declarationfunc ensureGlyphs(forCharacterRange charRange: NSRange)ensureGlyphsForGlyphRange(glyphRange: SDKHandle): voidSwift declarationfunc ensureGlyphs(forGlyphRange glyphRange: NSRange)ensureLayoutForBoundingRectIn(bounds: { x: number; y: number; width: number; height: number }, container: NSTextContainer): voidSwift declarationfunc ensureLayout(forBoundingRect bounds: CGRect, in container: NSTextContainer)ensureLayoutForCharacterRange(charRange: SDKHandle): voidSwift declarationfunc ensureLayout(forCharacterRange charRange: NSRange)ensureLayoutForGlyphRange(glyphRange: SDKHandle): voidSwift declarationfunc ensureLayout(forGlyphRange glyphRange: NSRange)ensureLayoutFor(container: NSTextContainer): voidSwift declarationfunc ensureLayout(for container: NSTextContainer)fillBackgroundRectArray(rectArray: "animatableData" | SDKHandle, rectCount: number, charRange: SDKHandle, color: UIColor): voidSwift declarationfunc fillBackgroundRectArray(_ rectArray: UnsafePointer<CGRect>, count rectCount: Int, forCharacterRange charRange: NSRange, color: UIColor)firstUnlaidCharacterIndex(): numberSwift declarationfunc firstUnlaidCharacterIndex() -> IntfirstUnlaidGlyphIndex(): numberSwift declarationfunc firstUnlaidGlyphIndex() -> IntfractionOfDistanceThroughGlyph(point: { x: number; y: number }, container: NSTextContainer): numberSwift declarationfunc fractionOfDistanceThroughGlyph(for point: CGPoint, in container: NSTextContainer) -> CGFloatgetFirstUnlaidCharacterIndex(charIndex?: (SDKHandle) | null, glyphIndex?: (SDKHandle) | null): voidSwift declarationfunc getFirstUnlaidCharacterIndex(_ charIndex: UnsafeMutablePointer<Int>?, glyphIndex: UnsafeMutablePointer<Int>?)getLineFragmentInsertionPoints(charIndex: number, aFlag: boolean, dFlag: boolean, positions?: ("animatableData" | SDKHandle) | null, charIndexes?: (SDKHandle) | null): numberSwift declarationfunc getLineFragmentInsertionPoints(forCharacterAt charIndex: Int, alternatePositions aFlag: Bool, inDisplayOrder dFlag: Bool, positions: UnsafeMutablePointer<CGFloat>?, characterIndexes charIndexes: UnsafeMutablePointer<Int>?) -> IntglyphAt(glyphIndex: number): numberSwift declarationfunc glyph(at glyphIndex: Int) -> CGGlyphglyphAtIsValidIndex(glyphIndex: number): { $ret: number; $out: { "isValidIndex": boolean } }Swift declarationfunc glyph(at glyphIndex: Int, isValidIndex: UnsafeMutablePointer<ObjCBool>?) -> CGGlyphOmit the output parameters from the call. The result contains $ret and $out, with isValidIndex inside $out.
glyphIndexForCharacter(charIndex: number): numberSwift declarationfunc glyphIndexForCharacter(at charIndex: Int) -> IntglyphIndexForIn(point: { x: number; y: number }, container: NSTextContainer): numberSwift declarationfunc glyphIndex(for point: CGPoint, in container: NSTextContainer) -> IntglyphIndexForInFractionOfDistanceThroughGlyph(point: { x: number; y: number }, container: NSTextContainer, partialFraction?: ("animatableData" | SDKHandle) | null): numberSwift declarationfunc glyphIndex(for point: CGPoint, in container: NSTextContainer, fractionOfDistanceThroughGlyph partialFraction: UnsafeMutablePointer<CGFloat>?) -> IntglyphRangeForBoundingRectIn(bounds: { x: number; y: number; width: number; height: number }, container: NSTextContainer): SDKHandleSwift declarationfunc glyphRange(forBoundingRect bounds: CGRect, in container: NSTextContainer) -> NSRangeglyphRangeForBoundingRectWithoutAdditionalLayoutIn(bounds: { x: number; y: number; width: number; height: number }, container: NSTextContainer): SDKHandleSwift declarationfunc glyphRange(forBoundingRectWithoutAdditionalLayout bounds: CGRect, in container: NSTextContainer) -> NSRangeglyphRangeForCharacterRangeActualCharacterRange(charRange: SDKHandle, actualCharRange?: (SDKHandle) | null): SDKHandleSwift declarationfunc glyphRange(forCharacterRange charRange: NSRange, actualCharacterRange actualCharRange: NSRangePointer?) -> NSRangeglyphRangeFor(container: NSTextContainer): SDKHandleSwift declarationfunc glyphRange(for container: NSTextContainer) -> NSRangestatic init(): NSLayoutManagerSwift declarationinit()static initCoder(coder: _Foundation_NSCoder): (NSLayoutManager) | nullSwift declarationinit?(coder: NSCoder)insertTextContainer(container: NSTextContainer, index: number): voidSwift declarationfunc insertTextContainer(_ container: NSTextContainer, at index: Int)invalidateDisplayForCharacterRange(charRange: SDKHandle): voidSwift declarationfunc invalidateDisplay(forCharacterRange charRange: NSRange)invalidateDisplayForGlyphRange(glyphRange: SDKHandle): voidSwift declarationfunc invalidateDisplay(forGlyphRange glyphRange: NSRange)invalidateGlyphs(charRange: SDKHandle, delta: number, actualCharRange?: (SDKHandle) | null): voidSwift declarationfunc invalidateGlyphs(forCharacterRange charRange: NSRange, changeInLength delta: Int, actualCharacterRange actualCharRange: NSRangePointer?)invalidateLayout(charRange: SDKHandle, actualCharRange?: (SDKHandle) | null): voidSwift declarationfunc invalidateLayout(forCharacterRange charRange: NSRange, actualCharacterRange actualCharRange: NSRangePointer?)isValidGlyphIndex(glyphIndex: number): booleanSwift declarationfunc isValidGlyphIndex(_ glyphIndex: Int) -> BoollineFragmentRectForGlyphAtEffectiveRange(glyphIndex: number, effectiveGlyphRange?: (SDKHandle) | null): { x: number; y: number; width: number; height: number }Swift declarationfunc lineFragmentRect(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?) -> CGRectlineFragmentRectForGlyphAtEffectiveRangeWithoutAdditionalLayout(glyphIndex: number, effectiveGlyphRange: (SDKHandle) | null, flag: boolean): { x: number; y: number; width: number; height: number }Swift declarationfunc lineFragmentRect(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?, withoutAdditionalLayout flag: Bool) -> CGRectlineFragmentUsedRectForGlyphAtEffectiveRange(glyphIndex: number, effectiveGlyphRange?: (SDKHandle) | null): { x: number; y: number; width: number; height: number }Swift declarationfunc lineFragmentUsedRect(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?) -> CGRectlineFragmentUsedRectForGlyphAtEffectiveRangeWithoutAdditionalLayout(glyphIndex: number, effectiveGlyphRange: (SDKHandle) | null, flag: boolean): { x: number; y: number; width: number; height: number }Swift declarationfunc lineFragmentUsedRect(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?, withoutAdditionalLayout flag: Bool) -> CGRectlocation(glyphIndex: number): { x: number; y: number }Swift declarationfunc location(forGlyphAt glyphIndex: Int) -> CGPointnotShownAttribute(glyphIndex: number): booleanSwift declarationfunc notShownAttribute(forGlyphAt glyphIndex: Int) -> BoolprocessEditing(textStorage: NSTextStorage, editMask: NSTextStorage_EditActions, newCharRange: SDKHandle, delta: number, invalidatedCharRange: SDKHandle): voidSwift declarationfunc processEditing(for textStorage: NSTextStorage, edited editMask: NSTextStorage.EditActions, range newCharRange: NSRange, changeInLength delta: Int, invalidatedRange invalidatedCharRange: NSRange)propertyForGlyph(glyphIndex: number): NSLayoutManager_GlyphPropertySwift declarationfunc propertyForGlyph(at glyphIndex: Int) -> NSLayoutManager.GlyphPropertyrange(glyphIndex: number): SDKHandleSwift declarationfunc range(ofNominallySpacedGlyphsContaining glyphIndex: Int) -> NSRangeremoveTextContainer(index: number): voidSwift declarationfunc removeTextContainer(at index: Int)setAttachmentSize(attachmentSize: { width: number; height: number }, glyphRange: SDKHandle): voidSwift declarationfunc setAttachmentSize(_ attachmentSize: CGSize, forGlyphRange glyphRange: NSRange)setDrawsOutsideLineFragment(flag: boolean, glyphIndex: number): voidSwift declarationfunc setDrawsOutsideLineFragment(_ flag: Bool, forGlyphAt glyphIndex: Int)setExtraLineFragmentRect(fragmentRect: { x: number; y: number; width: number; height: number }, usedRect: { x: number; y: number; width: number; height: number }, container: NSTextContainer): voidSwift declarationfunc setExtraLineFragmentRect(_ fragmentRect: CGRect, usedRect: CGRect, textContainer container: NSTextContainer)setLineFragmentRect(fragmentRect: { x: number; y: number; width: number; height: number }, glyphRange: SDKHandle, usedRect: { x: number; y: number; width: number; height: number }): voidSwift declarationfunc setLineFragmentRect(_ fragmentRect: CGRect, forGlyphRange glyphRange: NSRange, usedRect: CGRect)setLocation(location: { x: number; y: number }, glyphRange: SDKHandle): voidSwift declarationfunc setLocation(_ location: CGPoint, forStartOfGlyphRange glyphRange: NSRange)setNotShownAttribute(flag: boolean, glyphIndex: number): voidSwift declarationfunc setNotShownAttribute(_ flag: Bool, forGlyphAt glyphIndex: Int)setTextContainer(container: NSTextContainer, glyphRange: SDKHandle): voidSwift declarationfunc setTextContainer(_ container: NSTextContainer, forGlyphRange glyphRange: NSRange)showCGGlyphsPositionsCountFontMatrixAttributesIn(glyphs: SDKHandle, positions: "animatableData" | SDKHandle, glyphCount: number, font: UIFont, textMatrix: _CoreFoundation_CGAffineTransform, attributes: NativeMap<_Foundation_NSAttributedString_Key, unknown>, graphicsContext: _CoreGraphics_CGContext): voidSwift declarationfunc showCGGlyphs(_ glyphs: UnsafePointer<CGGlyph>, positions: UnsafePointer<CGPoint>, count glyphCount: Int, font: UIFont, matrix textMatrix: CGAffineTransform, attributes: [NSAttributedString.Key : Any] = [:], in graphicsContext: CGContext)showCGGlyphsPositionsCountFontTextMatrixAttributesIn(glyphs: SDKHandle, positions: "animatableData" | SDKHandle, glyphCount: number, font: UIFont, textMatrix: _CoreFoundation_CGAffineTransform, attributes: NativeMap<_Foundation_NSAttributedString_Key, unknown>, CGContext: _CoreGraphics_CGContext): voidSwift declarationfunc showCGGlyphs(_ glyphs: UnsafePointer<CGGlyph>, positions: UnsafePointer<CGPoint>, count glyphCount: Int, font: UIFont, textMatrix: CGAffineTransform, attributes: [NSAttributedString.Key : Any] = [:], in CGContext: CGContext)strikethroughGlyphRange(glyphRange: SDKHandle, strikethroughVal: NSUnderlineStyle, lineRect: { x: number; y: number; width: number; height: number }, lineGlyphRange: SDKHandle, containerOrigin: { x: number; y: number }): voidSwift declarationfunc strikethroughGlyphRange(_ glyphRange: NSRange, strikethroughType strikethroughVal: NSUnderlineStyle, lineFragmentRect lineRect: CGRect, lineFragmentGlyphRange lineGlyphRange: NSRange, containerOrigin: CGPoint)textContainerChangedGeometry(container: NSTextContainer): voidSwift declarationfunc textContainerChangedGeometry(_ container: NSTextContainer)textContainerForGlyphAtEffectiveRange(glyphIndex: number, effectiveGlyphRange?: (SDKHandle) | null): (NSTextContainer) | nullSwift declarationfunc textContainer(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?) -> NSTextContainer?textContainerForGlyphAtEffectiveRangeWithoutAdditionalLayout(glyphIndex: number, effectiveGlyphRange: (SDKHandle) | null, flag: boolean): (NSTextContainer) | nullSwift declarationfunc textContainer(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?, withoutAdditionalLayout flag: Bool) -> NSTextContainer?truncatedGlyphRange(glyphIndex: number): SDKHandleSwift declarationfunc truncatedGlyphRange(inLineFragmentForGlyphAt glyphIndex: Int) -> NSRangeunderlineGlyphRange(glyphRange: SDKHandle, underlineVal: NSUnderlineStyle, lineRect: { x: number; y: number; width: number; height: number }, lineGlyphRange: SDKHandle, containerOrigin: { x: number; y: number }): voidSwift declarationfunc underlineGlyphRange(_ glyphRange: NSRange, underlineType underlineVal: NSUnderlineStyle, lineFragmentRect lineRect: CGRect, lineFragmentGlyphRange lineGlyphRange: NSRange, containerOrigin: CGPoint)usedRect(container: NSTextContainer): { x: number; y: number; width: number; height: number }Swift declarationfunc usedRect(for container: NSTextContainer) -> CGRectget allowsNonContiguousLayout(): booleanSwift declarationvar allowsNonContiguousLayout: Bool { get set }set allowsNonContiguousLayout(value: boolean)Swift declarationvar allowsNonContiguousLayout: Bool { get set }get delegate(): (SDKHandle) | nullSwift declarationweak var delegate: (any NSLayoutManagerDelegate)? { get set }set delegate(value: (Implements<NSLayoutManagerDelegate> | SDKHandle) | null)Swift declarationweak var delegate: (any NSLayoutManagerDelegate)? { get set }get extraLineFragmentRect(): { x: number; y: number; width: number; height: number }Swift declarationvar extraLineFragmentRect: CGRect { get }get extraLineFragmentTextContainer(): (NSTextContainer) | nullSwift declarationvar extraLineFragmentTextContainer: NSTextContainer? { get }get extraLineFragmentUsedRect(): { x: number; y: number; width: number; height: number }Swift declarationvar extraLineFragmentUsedRect: CGRect { get }get hasNonContiguousLayout(): booleanSwift declarationvar hasNonContiguousLayout: Bool { get }get hyphenationFactor(): numberSwift declarationvar hyphenationFactor: CGFloat { get set }set hyphenationFactor(value: number)Swift declarationvar hyphenationFactor: CGFloat { get set }get limitsLayoutForSuspiciousContents(): booleanSwift declarationvar limitsLayoutForSuspiciousContents: Bool { get set }set limitsLayoutForSuspiciousContents(value: boolean)Swift declarationvar limitsLayoutForSuspiciousContents: Bool { get set }get numberOfGlyphs(): numberSwift declarationvar numberOfGlyphs: Int { get }get showsControlCharacters(): booleanSwift declarationvar showsControlCharacters: Bool { get set }set showsControlCharacters(value: boolean)Swift declarationvar showsControlCharacters: Bool { get set }get showsInvisibleCharacters(): booleanSwift declarationvar showsInvisibleCharacters: Bool { get set }set showsInvisibleCharacters(value: boolean)Swift declarationvar showsInvisibleCharacters: Bool { get set }get textContainers(): Array<NSTextContainer>Swift declarationvar textContainers: [NSTextContainer] { get }get textStorage(): (NSTextStorage) | nullSwift declarationunowned(unsafe) var textStorage: NSTextStorage? { get set }set textStorage(value: (NSTextStorage) | null)Swift declarationunowned(unsafe) var textStorage: NSTextStorage? { get set }get usesDefaultHyphenation(): booleanSwift declarationvar usesDefaultHyphenation: Bool { get set }set usesDefaultHyphenation(value: boolean)Swift declarationvar usesDefaultHyphenation: Bool { get set }get usesFontLeading(): booleanSwift declarationvar usesFontLeading: Bool { get set }set usesFontLeading(value: boolean)Swift declarationvar usesFontLeading: Bool { get set }4 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
NSLayoutManager.setGlyphs(_:properties:characterIndexes:font:forGlyphRange:)
The iOS SDK compiler rejected this binding: cannot convert value of type 'UnsafePointer<NSLayoutManager.GlyphProperty>' to expected argument type 'UnsafePointer<Int>'
NSLayoutManager.getGlyphs(in:glyphs:properties:characterIndexes:bidiLevels:)
The iOS SDK compiler rejected this binding: cannot convert value of type 'UnsafeMutablePointer<NSLayoutManager.GlyphProperty>' to expected argument type 'UnsafeMutablePointer<Int>'
NSLayoutManager.enumerateLineFragments(forGlyphRange:using:)
synchronous callback requires a nonescaping JS-thread call
NSLayoutManager.enumerateEnclosingRects(forGlyphRange:withinSelectedGlyphRange:in:using:)
synchronous callback requires a nonescaping JS-thread call