CGFont
A set of character glyphs and layout information for drawing text.
Declaration
class CGFontOverview
A glyph can represent a single character (such as ‘b’), more than one character (such as the “fi” ligature), or a special character such as a space. Core Graphics retrieves the glyphs for the font from ATS (Apple Type Services) and paints the glyphs based on the relevant parameters of the current graphics state.
Core Graphics provides a limited, low-level interface for drawing text. For information on text-drawing functions, see CGContext. For full Unicode and text-layout support, use the services provided by TextKit).
Topics
Creating Font Objects
Examining Font Metadata
Examining Font Metrics
Working with PostScript Fonts
postScriptNamecanCreatePostScriptSubset(_:)createPostScriptSubset(subsetName:format:glyphs:count:encoding:)CGFontPostScriptFormatcreatePostScriptEncoding(encoding:)
Working with Font Tables
Working with Variations
Working with Glyphs
numberOfGlyphsname(for:)getGlyphWithGlyphName(name:)getGlyphBBoxes(glyphs:count:bboxes:)getGlyphAdvances(glyphs:count:advances:)CGGlyphkCGGlyphMaxCGFontIndexkCGFontIndexMaxkCGFontIndexInvalid
Working with Core Foundation Types
See Also
Related Documentation
- Quartz 2D Programming Guide