Instance Method


Creates a copy of a font using a variation specification dictionary.


func copy(withVariations variations: CFDictionary?) -> CGFont?



The font to copy.


A variation specification dictionary that contains keys corresponding to the variation axis names of the font. Each key in the dictionary is a variation axis name. The value for each key is the value specified for that particular variation axis represented as a CFNumber object. If a variation axis name is not specified in variations, then the current value from font is used.

Return Value

The font object.

See Also

Working with Variations

var variations: CFDictionary?

Returns the variation specification dictionary for a font.

var variationAxes: CFArray?

Returns an array of the variation axis dictionaries for a font.

Font Variation Axis Keys

Keys used for a font variation axis dictionary.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software