Contents

CTLineGetTypographicBounds(_:_:_:_:)

Calculates the typographic bounds of a line.

Declaration

func CTLineGetTypographicBounds(_ line: CTLine, _ ascent: UnsafeMutablePointer<CGFloat>?, _ descent: UnsafeMutablePointer<CGFloat>?, _ leading: UnsafeMutablePointer<CGFloat>?) -> Double

Parameters

  • line:

    The line whose typographic bounds are calculated.

  • ascent:

    On output, the ascent of the line. This parameter can be set to NULL if not needed.

  • descent:

    On output, the descent of the line. This parameter can be set to NULL if not needed.

  • leading:

    On output, the leading of the line. This parameter can be set to NULL if not needed.

Return Value

The typographic width of the line. If the line is invalid, this function returns 0.

See Also

Measuring Lines