Creates a new font descriptor with the provided PostScript name and size.
SDKs
- iOS 3.2+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Text
Declaration
CTFont Descriptor Ref CTFontDescriptorCreateWithNameAndSize(CFString Ref name, CGFloat size);
Parameters
name
The PostScript name to be used for the font descriptor as a
CFString
object.Ref size
The point size. If
0
, the font size attribute (.0 k
) is omitted from the returned font descriptor.CTFont Size Attribute
Return Value
A new font descriptor reference with the given PostScript name and point size.