Skip to content

Font

Represents a font and text size.

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

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.

name string

Name of the font.

size number

Size of the font.

Creates a monospaced system font with the black weight.

static blackMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a rounded system font with the black weight.

static blackRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

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

static blackSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Preferred font for body texts.

static body(): Font

Font

Preferred font.

Creates a bold monospaced system font..

static boldMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a bold and rounded system font.

static boldRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a bold system font.

static boldSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Preferred font for callouts.

static callout(): Font

Font

Preferred font.

Preferred font for standard captions.

static caption1(): Font

Font

Preferred font.

Preferred font for alternate captions.

static caption2(): Font

Font

Preferred font.

Preferred font for footnotes.

static footnote(): Font

Font

Preferred font.

Preferred font for headings.

static headline(): Font

Font

Preferred font.

Creates a heavy monospaced system font.

static heavyMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a heavy and rounded system font.

static heavyRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a heavy system font.

static heavySystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates an italic system font.

static italicSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Preferred font for large titles.

static largeTitle(): Font

Font

Preferred font.

Creates a light monospaced system font.

static lightMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a light and rounded system font.

static lightRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a light system font.

static lightSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a medium monospaced system font.

static mediumMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a medium and rounded system font.

static mediumRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a medium system font.

static mediumSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a regular monospaced system font.

static regularMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a regular and rounded system font.

static regularRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a regular system font.

static regularSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a semibold monospaced system font.

static semiboldMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a semibold and rounded system font.

static semiboldRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a semibold system font.

static semiboldSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Preferred font for subheadings.

static subheadline(): Font

Font

Preferred font.

Creates a system font.

static systemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a thin monospaced system font.

static thinMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a thin and rounded system font.

static thinRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates a thin system font.

static thinSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Preferred font for first level hierarchical headings.

static title1(): Font

Font

Preferred font.

Preferred font for second level hierarchical headings.

static title2(): Font

Font

Preferred font.

Preferred font for third level hierarchical headings.

static title3(): Font

Font

Preferred font.

Creates an ultra light monospaced system font.

static ultraLightMonospacedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates an ultra light and rounded system font.

static ultraLightRoundedSystemFont(size: number): Font

size number

Size of the text.

Font

Font.

Creates an ultra light system font.

static ultraLightSystemFont(size: number): Font

size number

Size of the text.

Font

Font.