Font

Represents a font and text size.

The font can be used to style texts, for example in widgets.

-new Font

Constructs a new font.

new Font(name: string, size: number)

Refer to iosfonts.com for a list of the fonts that are available in iOS and iPadOS.

Parameters

name
string
Name of the font.

size
number
Size of the font.


+largeTitle

Preferred font for large titles.

static largeTitle(): Font

Return value

Font
Preferred font.


+title1

Preferred font for first level hierarchical headings.

static title1(): Font

Return value

Font
Preferred font.


+title2

Preferred font for second level hierarchical headings.

static title2(): Font

Return value

Font
Preferred font.


+title3

Preferred font for third level hierarchical headings.

static title3(): Font

Return value

Font
Preferred font.


+headline

Preferred font for headings.

static headline(): Font

Return value

Font
Preferred font.


+subheadline

Preferred font for subheadings.

static subheadline(): Font

Return value

Font
Preferred font.


+body

Preferred font for body texts.

static body(): Font

Return value

Font
Preferred font.


+callout

Preferred font for callouts.

static callout(): Font

Return value

Font
Preferred font.


+footnote

Preferred font for footnotes.

static footnote(): Font

Return value

Font
Preferred font.


+caption1

Preferred font for standard captions.

static caption1(): Font

Return value

Font
Preferred font.


+caption2

Preferred font for alternate captions.

static caption2(): Font

Return value

Font
Preferred font.


+systemFont

Creates a system font.

static systemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+ultraLightSystemFont

Creates an ultra light system font.

static ultraLightSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+thinSystemFont

Creates a thin system font.

static thinSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+lightSystemFont

Creates a light system font.

static lightSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+regularSystemFont

Creates a regular system font.

static regularSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+mediumSystemFont

Creates a medium system font.

static mediumSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+semiboldSystemFont

Creates a semibold system font.

static semiboldSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+boldSystemFont

Creates a bold system font.

static boldSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+heavySystemFont

Creates a heavy system font.

static heavySystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+blackSystemFont

Creates a font with the system appearance with the black weight.

static blackSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+italicSystemFont

Creates an italic system font.

static italicSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+ultraLightMonospacedSystemFont

Creates an ultra light monospaced system font.

static ultraLightMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+thinMonospacedSystemFont

Creates a thin monospaced system font.

static thinMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+lightMonospacedSystemFont

Creates a light monospaced system font.

static lightMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+regularMonospacedSystemFont

Creates a regular monospaced system font.

static regularMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+mediumMonospacedSystemFont

Creates a medium monospaced system font.

static mediumMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+semiboldMonospacedSystemFont

Creates a semibold monospaced system font.

static semiboldMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+boldMonospacedSystemFont

Creates a bold monospaced system font..

static boldMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+heavyMonospacedSystemFont

Creates a heavy monospaced system font.

static heavyMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+blackMonospacedSystemFont

Creates a monospaced system font with the black weight.

static blackMonospacedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+ultraLightRoundedSystemFont

Creates an ultra light and rounded system font.

static ultraLightRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+thinRoundedSystemFont

Creates a thin and rounded system font.

static thinRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+lightRoundedSystemFont

Creates a light and rounded system font.

static lightRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+regularRoundedSystemFont

Creates a regular and rounded system font.

static regularRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+mediumRoundedSystemFont

Creates a medium and rounded system font.

static mediumRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+semiboldRoundedSystemFont

Creates a semibold and rounded system font.

static semiboldRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+boldRoundedSystemFont

Creates a bold and rounded system font.

static boldRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+heavyRoundedSystemFont

Creates a heavy and rounded system font.

static heavyRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.


+blackRoundedSystemFont

Creates a rounded system font with the black weight.

static blackRoundedSystemFont(size: number): Font

Parameters

size
number
Size of the text.

Return value

Font
Font.