Type Method

systemFontOfSize:weight:

Returns the standard system font with the specified size and weight.

Declaration

+ (NSFont *)systemFontOfSize:(CGFloat)fontSize weight:(NSFontWeight)weight;

Parameters

fontSize

The desired font size specified in points. If you specify 0.0 or a negative number for this parameter, the method returns the system font at the default size.

weight

The desired weight of font lines, specified as one of the constants in NSFontWeight.

Return Value

A font object containing the system font at the specified size and weight.

Discussion

Use the returned font for standard interface items, including button labels, menu items, and so on that require a specific font style information.

See Also

Creating System Fonts

+ systemFontOfSize:

Returns the standard system font with the specified size.

+ boldSystemFontOfSize:

Returns the standard system font in boldface type with the specified size.

+ monospacedSystemFontOfSize:weight:

Returns a monospace version of the system font with the specified size and weight.

+ monospacedDigitSystemFontOfSize:weight:

Returns a version of the standard system font that contains monospaced digit glyphs.

systemFontSize

Returns the size of the standard system font.

smallSystemFontSize

Returns the size of the standard small system font.

NSFontWeight

System-defined font-weight values.