CTFontCreateWithName(_:_:_:)
Returns a new font reference for the given name.
Declaration
func CTFontCreateWithName(_ name: CFString, _ size: CGFloat, _ matrix: UnsafePointer<CGAffineTransform>?) -> CTFontParameters
- name:
The font name for which you wish to create a new font reference. A valid PostScript name is preferred, although other font name types are matched in a fallback manner.
- size:
The point size for the font reference. If
0.0is specified, the default font size of12.0is used. This parameter is optional. - matrix:
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the identity matrix is used. This parameter is optional.
Return Value
Returns a CTFontRef that best matches the name provided with size and matrix attributes.
Discussion
The name parameter is the only required parameter, and default values are used for unspecified parameters (0.0 for size and NULL for matrix). If all parameters cannot be matched identically, a best match is found.
See Also
Creating Fonts
CTFontCreateWithNameAndOptions(_:_:_:_:)CTFontCreateWithFontDescriptor(_:_:_:)CTFontCreateWithFontDescriptorAndOptions(_:_:_:_:)CTFontCreateUIFontForLanguage(_:_:_:)CTFontCreateCopyWithAttributes(_:_:_:_:)CTFontCreateCopyWithSymbolicTraits(_:_:_:_:_:)CTFontCreateCopyWithFamily(_:_:_:_:)CTFontCreateForString(_:_:_:)CTFontCreateForStringWithLanguage(_:_:_:_:)