Returns a font whose traits are as similar as possible to those of the given font except for the typeface, which is changed to the given typeface.
- macOS 10.0+
The font whose traits are matched.
The new typeface; a fully specified family-face name, such as Helvetica-BoldOblique or Times-Roman.
A font with matching traits and the given typeface, or
a if it can’t be converted.
This method attempts to match the weight and posture of
a as closely as possible. Italic is mapped to Oblique, for example. Weights are mapped based on an approximate numeric scale of 0 to 15.