Contents

CTFontCreateCopyWithFamily(_:_:_:_:)

Returns a new font in the specified family based on the traits of the original font.

Declaration

func CTFontCreateCopyWithFamily(_ font: CTFont, _ size: CGFloat, _ matrix: UnsafePointer<CGAffineTransform>?, _ family: CFString) -> CTFont?

Parameters

  • font:

    The original font reference on which to base the new font.

  • size:

    The point size for the font reference. If 0.0 is specified, the original font’s size is preserved.

  • matrix:

    The transformation matrix for the font. In most cases, set this parameter to be NULL. If NULL is specified, the original font’s matrix is preserved.

  • family:

    The name of the desired family.

Return Value

A new font reference with the original traits in the given family, or NULL if none is found in the system.

See Also

Creating Fonts