Calculates the optical bounds for an array of glyphs and returns the overall optical bounds for the run.
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Text
The font reference.
An array of glyphs.
An array of
CGRects to receive the computed glyph bounds. This parameter can be
NULL, in which case the function only calculates the overall bounding rectangle.
The capacity of the
Reserved, set to zero.
This function returns the overall bounding rectangle for an array of glyphs. The
bounding parameter returns the bounding rectangles of the individual glyphs. These rectangles are the design metrics from the font transformed in font space.
Fonts may specify the optical edges of glyphs that can be used to make the edges of lines of text line up in a more visually pleasing way. This function returns bounding rectangles that correspond to these specifications if the font provides them; otherwise, it returns typographic bounding rectangles, composed of the font’s ascender and descender and a glyph’s advance width.