Instance Method

cgGlyph(at:)

Returns the glyph at the specified index.

Declaration

func cgGlyph(at glyphIndex: Int) -> CGGlyph

Parameters

glyphIndex

The index of the glyph that you want. If the index is out of range, this method raises an exception with the error rangeException.

Return Value

The glyph at the specified index.

Discussion

Calling this method generates all of the glyphs (as needed) up to and including the glyph at the specified index.

See Also

Accessing Glyphs

func cgGlyph(at: Int, isValidIndex: UnsafeMutablePointer<ObjCBool>?) -> CGGlyph

Returns the glyph at the specified index and information about whether the glyph index is valid.

func characterIndexForGlyph(at: Int) -> Int

Returns the index in the text storage for the first character associated with the given glyph.

func glyphIndexForCharacter(at: Int) -> Int

Returns the index of the first glyph associated with the character at the specified index.

func isValidGlyphIndex(Int) -> Bool

Indicates whether the specified index refers to a valid glyph, otherwise false.

var numberOfGlyphs: Int

The number of glyphs in the receiver.

func propertyForGlyph(at: Int) -> NSLayoutManager.GlyphProperty

Returns the glyph property associated with the glyph at the specified index.