Instance Method


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


- (CGGlyph)CGGlyphAtIndex:(NSUInteger)glyphIndex isValidIndex:(BOOL *)isValidIndex;



The index of the glyph that you want.


An optional Boolean variable. On return, the variable is set to YES if the glyph index is valid or NO if it is not.

Return Value

The glyph at the specified index or kCGFontIndexInvalid if the index is out of range.


If noncontiguous layout is disabled, calling this method generates all glyphs up to and including the one at glyphIndex.

See Also

Accessing Glyphs

- getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:

Fills a passed-in buffer with a sequence of glyphs.

- CGGlyphAtIndex:

Returns the glyph at the specified index.

- setGlyphs:properties:characterIndexes:font:forGlyphRange:

Stores the initial glyphs and glyph properties for a character range.

- characterIndexForGlyphAtIndex:

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

- glyphIndexForCharacterAtIndex:

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

- isValidGlyphIndex:

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


The number of glyphs in the receiver.

- propertyForGlyphAtIndex:

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software