Function

CTFontGetGlyphWithName

Returns the CGGlyph value for the specified glyph name in the given font.

Declaration

CGGlyph CTFontGetGlyphWithName(CTFontRef font, CFStringRef glyphName);

Parameters

font

The font reference.

glyphName

The glyph name as a CFString object.

Return Value

The glyph value for the named glyph as a CGGlyph object, or if the glyph name is not recognized, the .notdef glyph index value.

Discussion

The returned CGGlyph object can be used with any of the subsequent glyph data accessors or directly with Core Graphics.

See Also

Getting Glyph Data

CTFontCreatePathForGlyph

Creates a path for the specified glyph.

CTFontGetBoundingRectsForGlyphs

Calculates the bounding rects for an array of glyphs and returns the overall bounding rectangle for the glyph run.

CTFontGetAdvancesForGlyphs

Calculates the advances for an array of glyphs and returns the summed advance.

CTFontGetVerticalTranslationsForGlyphs

Calculates the offset from the default (horizontal) origin to the vertical origin for an array of glyphs.

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