Instance Method

getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:

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

Declaration

- (NSUInteger)getGlyphsInRange:(NSRange)glyphRange glyphs:(CGGlyph *)glyphBuffer properties:(NSGlyphProperty *)props characterIndexes:(NSUInteger *)charIndexBuffer bidiLevels:(unsigned char *)bidiLevelBuffer;

Parameters

glyphRange

The range of glyphs to fill in.

glyphBuffer

On output, the sequence of glyphs in the given glyph range.

props

If not NULL, on output, the glyph properties corresponding to the filled-in glyphs.

charIndexBuffer

If not NULL, on output, the indexes of the original characters corresponding to the given glyph range. Note that a glyph at index 1 is not necessarily mapped to the character at index 1, since a glyph may be for a ligature or accent.

bidiLevelBuffer

If not NULL, on output, the direction of each glyph for bidirectional text. The values range from 0 to 61 as defined by Unicode Standard Annex #9. An even value means the glyph goes left-to-right, and an odd value means the glyph goes right-to-left.

Return Value

The number of glyphs returned in glyphBuffer.

Discussion

Each pointer passed in should either be NULL or else point to sufficient memory to hold glyphRange.length elements.

See Also

Accessing Glyphs

- CGGlyphAtIndex:

Returns the glyph at the specified index.

- CGGlyphAtIndex:isValidIndex:

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

- 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.

numberOfGlyphs

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