Mac Guides | Samples

MonoMac.CoreText.CTFont Constructor

Syntax

public CTFont (String name, Single size)

Parameters

name
The name of the font. Use PostScript names (for example "HelveticaNeue").
size
The desired font size. If you specify zero, it will use the system default.

Remarks

Although currently iOS this allows the "name" parameter to use aliases to the font, in addition to the Postscript name, use of non-Postscript names for this parameter has been deprecated, due to the slow and expensive fallback scan.

If you want to create fonts from other names (like the fullname "Helvetica Neue" instead of the PostScript name "HelveticaNeue") you can use CTFontDescriptor.CTFontDescriptor(CTFontDescriptorAttributes).

Requirements

Namespace: MonoMac.CoreText
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0