---
title: Font
description: Represents a font and text size.
---

Represents a font and text size.

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

## Methods

<span id="-new-font" class="api-anchor"></span>

### new Font(name, size)

Constructs a new font.

```typescript
new Font(name: string, size: number)
```

Refer to <a href="http://iosfonts.com">iosfonts.com</a> 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.

<span id="blackmonospacedsystemfont" class="api-anchor"></span>

### blackMonospacedSystemFont(size)

Creates a monospaced system font with the black weight.

```typescript
static blackMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="blackroundedsystemfont" class="api-anchor"></span>

### blackRoundedSystemFont(size)

Creates a rounded system font with the black weight.

```typescript
static blackRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="blacksystemfont" class="api-anchor"></span>

### blackSystemFont(size)

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

```typescript
static blackSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

### body()

Preferred font for body texts.

```typescript
static body(): Font
```

#### Return value

**`Font`**

Preferred font.

<span id="boldmonospacedsystemfont" class="api-anchor"></span>

### boldMonospacedSystemFont(size)

Creates a bold monospaced system font..

```typescript
static boldMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="boldroundedsystemfont" class="api-anchor"></span>

### boldRoundedSystemFont(size)

Creates a bold and rounded system font.

```typescript
static boldRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="boldsystemfont" class="api-anchor"></span>

### boldSystemFont(size)

Creates a bold system font.

```typescript
static boldSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

### callout()

Preferred font for callouts.

```typescript
static callout(): Font
```

#### Return value

**`Font`**

Preferred font.

### caption1()

Preferred font for standard captions.

```typescript
static caption1(): Font
```

#### Return value

**`Font`**

Preferred font.

### caption2()

Preferred font for alternate captions.

```typescript
static caption2(): Font
```

#### Return value

**`Font`**

Preferred font.

### footnote()

Preferred font for footnotes.

```typescript
static footnote(): Font
```

#### Return value

**`Font`**

Preferred font.

### headline()

Preferred font for headings.

```typescript
static headline(): Font
```

#### Return value

**`Font`**

Preferred font.

<span id="heavymonospacedsystemfont" class="api-anchor"></span>

### heavyMonospacedSystemFont(size)

Creates a heavy monospaced system font.

```typescript
static heavyMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="heavyroundedsystemfont" class="api-anchor"></span>

### heavyRoundedSystemFont(size)

Creates a heavy and rounded system font.

```typescript
static heavyRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="heavysystemfont" class="api-anchor"></span>

### heavySystemFont(size)

Creates a heavy system font.

```typescript
static heavySystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="italicsystemfont" class="api-anchor"></span>

### italicSystemFont(size)

Creates an italic system font.

```typescript
static italicSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

### largeTitle()

Preferred font for large titles.

```typescript
static largeTitle(): Font
```

#### Return value

**`Font`**

Preferred font.

<span id="lightmonospacedsystemfont" class="api-anchor"></span>

### lightMonospacedSystemFont(size)

Creates a light monospaced system font.

```typescript
static lightMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="lightroundedsystemfont" class="api-anchor"></span>

### lightRoundedSystemFont(size)

Creates a light and rounded system font.

```typescript
static lightRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="lightsystemfont" class="api-anchor"></span>

### lightSystemFont(size)

Creates a light system font.

```typescript
static lightSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="mediummonospacedsystemfont" class="api-anchor"></span>

### mediumMonospacedSystemFont(size)

Creates a medium monospaced system font.

```typescript
static mediumMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="mediumroundedsystemfont" class="api-anchor"></span>

### mediumRoundedSystemFont(size)

Creates a medium and rounded system font.

```typescript
static mediumRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="mediumsystemfont" class="api-anchor"></span>

### mediumSystemFont(size)

Creates a medium system font.

```typescript
static mediumSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="regularmonospacedsystemfont" class="api-anchor"></span>

### regularMonospacedSystemFont(size)

Creates a regular monospaced system font.

```typescript
static regularMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="regularroundedsystemfont" class="api-anchor"></span>

### regularRoundedSystemFont(size)

Creates a regular and rounded system font.

```typescript
static regularRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="regularsystemfont" class="api-anchor"></span>

### regularSystemFont(size)

Creates a regular system font.

```typescript
static regularSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="semiboldmonospacedsystemfont" class="api-anchor"></span>

### semiboldMonospacedSystemFont(size)

Creates a semibold monospaced system font.

```typescript
static semiboldMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="semiboldroundedsystemfont" class="api-anchor"></span>

### semiboldRoundedSystemFont(size)

Creates a semibold and rounded system font.

```typescript
static semiboldRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="semiboldsystemfont" class="api-anchor"></span>

### semiboldSystemFont(size)

Creates a semibold system font.

```typescript
static semiboldSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

### subheadline()

Preferred font for subheadings.

```typescript
static subheadline(): Font
```

#### Return value

**`Font`**

Preferred font.

<span id="systemfont" class="api-anchor"></span>

### systemFont(size)

Creates a system font.

```typescript
static systemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="thinmonospacedsystemfont" class="api-anchor"></span>

### thinMonospacedSystemFont(size)

Creates a thin monospaced system font.

```typescript
static thinMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="thinroundedsystemfont" class="api-anchor"></span>

### thinRoundedSystemFont(size)

Creates a thin and rounded system font.

```typescript
static thinRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="thinsystemfont" class="api-anchor"></span>

### thinSystemFont(size)

Creates a thin system font.

```typescript
static thinSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

### title1()

Preferred font for first level hierarchical headings.

```typescript
static title1(): Font
```

#### Return value

**`Font`**

Preferred font.

### title2()

Preferred font for second level hierarchical headings.

```typescript
static title2(): Font
```

#### Return value

**`Font`**

Preferred font.

### title3()

Preferred font for third level hierarchical headings.

```typescript
static title3(): Font
```

#### Return value

**`Font`**

Preferred font.

<span id="ultralightmonospacedsystemfont" class="api-anchor"></span>

### ultraLightMonospacedSystemFont(size)

Creates an ultra light monospaced system font.

```typescript
static ultraLightMonospacedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="ultralightroundedsystemfont" class="api-anchor"></span>

### ultraLightRoundedSystemFont(size)

Creates an ultra light and rounded system font.

```typescript
static ultraLightRoundedSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.

<span id="ultralightsystemfont" class="api-anchor"></span>

### ultraLightSystemFont(size)

Creates an ultra light system font.

```typescript
static ultraLightSystemFont(size: number): Font
```

#### Parameters

**`size` `number`**

Size of the text.

#### Return value

**`Font`**

Font.