Instance Method

glyphAtIndex:isValidIndex:

If the given index is valid, returns the glyph at that location and optionally returns a flag indicating whether the requested index is in range.

Declaration

iOS, Mac Catalyst, tvOS
- (CGGlyph)glyphAtIndex:(NSUInteger)glyphIndex isValidIndex:(BOOL *)isValidIndex;
macOS
- (NSGlyph)glyphAtIndex:(NSUInteger)glyphIndex isValidIndex:(BOOL *)isValidIndex;

Parameters

glyphIndex

The index of the glyph to be returned.

isValidIndex

If not NULL, on output, YES if the requested index is in range; otherwise NO.

Return Value

The glyph at the requested index, or NSNullGlyph if the requested index is out of the range {0, numberOfGlyphs}.

Discussion

If noncontiguous layout is not enabled, this method causes generation of all glyphs up to and including glyphIndex.

See Also

Deprecated

attributedString

The text storage object from which the NSGlyphGenerator object procures characters for glyph generation.

- invalidateGlyphsOnLayoutInvalidationForGlyphRange:

Specifies explicitly when portions of the glyph stream depend on layout.

Deprecated
- invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:

Invalidates the layout information for the glyphs mapped to the given range of characters.

Deprecated
- textStorage:edited:range:changeInLength:invalidatedRange:

Invalidates glyph and layout information for a portion of the text in the given text storage object.

Deprecated
- insertGlyph:atGlyphIndex:characterIndex:

Inserts a single glyph into the glyph stream at the given index and maps it to the character at the given character index.

Deprecated
- insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:

Inserts the given glyphs into the glyph cache at the given index and maps them to characters beginning at the given character index.

Deprecated
- glyphAtIndex:

Returns the glyph at glyphIndex.

Deprecated
- replaceGlyphAtIndex:withGlyph:

Replaces the glyph at the given index with a new glyph.

Deprecated
- getGlyphs:range:

Fills the passed-in buffer with a sequence of glyphs

Deprecated
- getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:

Returns the glyphs and information needed to perform layout for the given glyph range.

Deprecated
- getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:

Returns the glyphs and information needed to perform layout for the given glyph range.

Deprecated
- deleteGlyphsInRange:

Deletes the glyphs in the given range from the receiver’s glyph store.

Deprecated
- setCharacterIndex:forGlyphAtIndex:

Sets the index of the character corresponding to the glyph at the given glyph index.

Deprecated
- intAttribute:forGlyphAtIndex:

Returns the value of the attribute identified by the given attribute tag for the glyph at the given index.

Deprecated
- setIntAttribute:value:forGlyphAtIndex:

Sets a custom attribute value for a given glyph.

Deprecated
- setLocations:startingGlyphIndexes:count:forGlyphRange:

Sets locations for many glyph ranges at once.

Deprecated
- rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:

Returns an array of rectangles and, by reference, the number of such rectangles, that define the region in the given container enclosing the given character range.

Deprecated
- rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:

Returns an array of rectangles and, by reference, the number of such rectangles, that define the region in the given container enclosing the given glyph range.

Deprecated
- layoutOptions

The layout manager’s current layout options.

usesScreenFonts

A Boolean that controls using screen fonts to calculate layout and display text.

Deprecated
- substituteFontForFont:

Returns a screen font suitable for use in place of the given font, if one is available.

Deprecated