Font
Represents a font and text size.
The font can be used to style texts, for example in widgets.
Methods
Section titled “Methods”
new Font(name, size)
Section titled “new Font(name, size)”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
Section titled “Parameters”name string
Name of the font.
size number
Size of the font.
blackMonospacedSystemFont(size)
Section titled “blackMonospacedSystemFont(size)”Creates a monospaced system font with the black weight.
static blackMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
blackRoundedSystemFont(size)
Section titled “blackRoundedSystemFont(size)”Creates a rounded system font with the black weight.
static blackRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
blackSystemFont(size)
Section titled “blackSystemFont(size)”Creates a font with the system appearance with the black weight.
static blackSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
body()
Section titled “body()”Preferred font for body texts.
static body(): FontReturn value
Section titled “Return value”Font
Preferred font.
boldMonospacedSystemFont(size)
Section titled “boldMonospacedSystemFont(size)”Creates a bold monospaced system font..
static boldMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
boldRoundedSystemFont(size)
Section titled “boldRoundedSystemFont(size)”Creates a bold and rounded system font.
static boldRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
boldSystemFont(size)
Section titled “boldSystemFont(size)”Creates a bold system font.
static boldSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
callout()
Section titled “callout()”Preferred font for callouts.
static callout(): FontReturn value
Section titled “Return value”Font
Preferred font.
caption1()
Section titled “caption1()”Preferred font for standard captions.
static caption1(): FontReturn value
Section titled “Return value”Font
Preferred font.
caption2()
Section titled “caption2()”Preferred font for alternate captions.
static caption2(): FontReturn value
Section titled “Return value”Font
Preferred font.
footnote()
Section titled “footnote()”Preferred font for footnotes.
static footnote(): FontReturn value
Section titled “Return value”Font
Preferred font.
headline()
Section titled “headline()”Preferred font for headings.
static headline(): FontReturn value
Section titled “Return value”Font
Preferred font.
heavyMonospacedSystemFont(size)
Section titled “heavyMonospacedSystemFont(size)”Creates a heavy monospaced system font.
static heavyMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
heavyRoundedSystemFont(size)
Section titled “heavyRoundedSystemFont(size)”Creates a heavy and rounded system font.
static heavyRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
heavySystemFont(size)
Section titled “heavySystemFont(size)”Creates a heavy system font.
static heavySystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
italicSystemFont(size)
Section titled “italicSystemFont(size)”Creates an italic system font.
static italicSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
largeTitle()
Section titled “largeTitle()”Preferred font for large titles.
static largeTitle(): FontReturn value
Section titled “Return value”Font
Preferred font.
lightMonospacedSystemFont(size)
Section titled “lightMonospacedSystemFont(size)”Creates a light monospaced system font.
static lightMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
lightRoundedSystemFont(size)
Section titled “lightRoundedSystemFont(size)”Creates a light and rounded system font.
static lightRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
lightSystemFont(size)
Section titled “lightSystemFont(size)”Creates a light system font.
static lightSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
mediumMonospacedSystemFont(size)
Section titled “mediumMonospacedSystemFont(size)”Creates a medium monospaced system font.
static mediumMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
mediumRoundedSystemFont(size)
Section titled “mediumRoundedSystemFont(size)”Creates a medium and rounded system font.
static mediumRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
mediumSystemFont(size)
Section titled “mediumSystemFont(size)”Creates a medium system font.
static mediumSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
regularMonospacedSystemFont(size)
Section titled “regularMonospacedSystemFont(size)”Creates a regular monospaced system font.
static regularMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
regularRoundedSystemFont(size)
Section titled “regularRoundedSystemFont(size)”Creates a regular and rounded system font.
static regularRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
regularSystemFont(size)
Section titled “regularSystemFont(size)”Creates a regular system font.
static regularSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
semiboldMonospacedSystemFont(size)
Section titled “semiboldMonospacedSystemFont(size)”Creates a semibold monospaced system font.
static semiboldMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
semiboldRoundedSystemFont(size)
Section titled “semiboldRoundedSystemFont(size)”Creates a semibold and rounded system font.
static semiboldRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
semiboldSystemFont(size)
Section titled “semiboldSystemFont(size)”Creates a semibold system font.
static semiboldSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
subheadline()
Section titled “subheadline()”Preferred font for subheadings.
static subheadline(): FontReturn value
Section titled “Return value”Font
Preferred font.
systemFont(size)
Section titled “systemFont(size)”Creates a system font.
static systemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
thinMonospacedSystemFont(size)
Section titled “thinMonospacedSystemFont(size)”Creates a thin monospaced system font.
static thinMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
thinRoundedSystemFont(size)
Section titled “thinRoundedSystemFont(size)”Creates a thin and rounded system font.
static thinRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
thinSystemFont(size)
Section titled “thinSystemFont(size)”Creates a thin system font.
static thinSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
title1()
Section titled “title1()”Preferred font for first level hierarchical headings.
static title1(): FontReturn value
Section titled “Return value”Font
Preferred font.
title2()
Section titled “title2()”Preferred font for second level hierarchical headings.
static title2(): FontReturn value
Section titled “Return value”Font
Preferred font.
title3()
Section titled “title3()”Preferred font for third level hierarchical headings.
static title3(): FontReturn value
Section titled “Return value”Font
Preferred font.
ultraLightMonospacedSystemFont(size)
Section titled “ultraLightMonospacedSystemFont(size)”Creates an ultra light monospaced system font.
static ultraLightMonospacedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
ultraLightRoundedSystemFont(size)
Section titled “ultraLightRoundedSystemFont(size)”Creates an ultra light and rounded system font.
static ultraLightRoundedSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.
ultraLightSystemFont(size)
Section titled “ultraLightSystemFont(size)”Creates an ultra light system font.
static ultraLightSystemFont(size: number): FontParameters
Section titled “Parameters”size number
Size of the text.
Return value
Section titled “Return value”Font
Font.