glyph(at:)
Returns the glyph at the specified index.
Declaration
func glyph(at glyphIndex: Int) -> CGGlyphParameters
- glyphIndex:
The index of a glyph in the receiver. This value must not exceed the bounds of the receiver’s glyph array.
Return Value
The glyph at glyphIndex.
Discussion
Raises an NSRangeException if glyphIndex is out of bounds.
Performs glyph generation if needed. To avoid an exception with glyph(at:) you must first check the glyph index against the number of glyphs, which requires generating all glyphs. Another method, glyph(at:isValidIndex:), generates glyphs only up to the one requested, so using it can be more efficient.
See Also
Methods
showCGGlyphs(_:positions:count:font:matrix:attributes:in:)invalidateGlyphs(onLayoutInvalidationForGlyphRange:)invalidateLayout(forCharacterRange:isSoft:actualCharacterRange:)textStorage(_:edited:range:changeInLength:invalidatedRange:)insertGlyph(_:atGlyphIndex:characterIndex:)insertGlyphs(_:length:forStartingGlyphAt:characterIndex:)glyph(at:isValidIndex:)replaceGlyph(at:withGlyph:)getGlyphs(_:range:)getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:)getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)deleteGlyphs(in:)setCharacterIndex(_:forGlyphAt:)intAttribute(_:forGlyphAt:)setIntAttribute(_:value:forGlyphAt:)