CTFontGetBoundingRectsForGlyphs(_:_:_:_:_:)
Calculates the bounding rects for an array of glyphs and returns the overall bounding rectangle for the glyph run.
Declaration
func CTFontGetBoundingRectsForGlyphs(_ font: CTFont, _ orientation: CTFontOrientation, _ glyphs: UnsafePointer<CGGlyph>, _ boundingRects: UnsafeMutablePointer<CGRect>?, _ count: CFIndex) -> CGRectParameters
- font:
The font reference.
- orientation:
The intended drawing orientation of the glyphs. Used to determined which glyph metrics to return.
- glyphs:
An array of
countnumber of glyphs. - boundingRects:
On output, the computed glyph rectangles in an array of
countnumber of Cgrect objects. IfNULL, only the overall bounding rectangle is calculated. - count:
The capacity of the
glyphsandboundingRectsbuffers.
Return Value
The overall bounding rectangle for an array or run of glyphs. Returns CGRectNull on error.
Discussion
The bounding rectangles of the individual glyphs are returned through the boundingRects parameter. These are the design metrics from the font transformed in font space.