> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/datatype/font.md).

# Font

## Overview

Font is a data type that expresses the font applied to text, including the font family, the thickness, and the italic style, as a single value.

It is used in the FontFace property of TextLabel and TextButton, and in the Font property of GetTextBoundsParams.

The following font families are available. The Asset Id is the value passed to new() and fromId(), and the value passed to fromName() is the font name without spaces. For example, Press Start 2P is passed as PressStart2P.

| Font             | Asset Id                | Weight                                                                     | Italic | English | Portuguese | Hindi |
| ---------------- | ----------------------- | -------------------------------------------------------------------------- | :----: | :-----: | :--------: | :---: |
| Anton            | ovdrassetid://900000166 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Archivo Black    | ovdrassetid://900000366 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Baloo 2          | ovdrassetid://900000566 | Regular, Medium, SemiBold, Bold, ExtraBold                                 |    -   |    O    |      O     |   O   |
| Creepster        | ovdrassetid://900001166 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Eater            | ovdrassetid://900001366 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Fredoka          | ovdrassetid://900001566 | Light, Regular, Medium, SemiBold, Bold                                     |    -   |    O    |      O     |   -   |
| Great Vibes      | ovdrassetid://900002166 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Grenze Gotisch   | ovdrassetid://900002366 | Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black |    -   |    O    |      O     |   -   |
| Kalam            | ovdrassetid://900003366 | Light, Regular, Bold                                                       |    -   |    O    |      O     |   O   |
| Michroma         | ovdrassetid://900003766 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Nosifer          | ovdrassetid://900003966 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Noto Sans        | ovdrassetid://900004166 | Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black |    O   |    O    |      O     |   O   |
| Nunito           | ovdrassetid://900006066 | ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black       |    O   |    O    |      O     |   -   |
| Orbitron         | ovdrassetid://900007766 | Regular, Medium, SemiBold, Bold, ExtraBold, Black                          |    -   |    O    |      O     |   -   |
| OverWacky        | ovdrassetid://900008466 | Black                                                                      |    O   |    O    |      O     |   -   |
| Patrick Hand     | ovdrassetid://900008766 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Permanent Marker | ovdrassetid://900008966 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Playfair Display | ovdrassetid://900009166 | Regular, Medium, SemiBold, Bold, ExtraBold, Black                          |    O   |    O    |      O     |   -   |
| Press Start 2P   | ovdrassetid://900010466 | Regular                                                                    |    -   |    O    |      O     |   -   |
| Roboto           | ovdrassetid://900010666 | Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black |    O   |    O    |      O     |   -   |
| Sono             | ovdrassetid://900012566 | ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold              |    -   |    O    |      O     |   -   |
| Tomorrow         | ovdrassetid://900013366 | Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black |    O   |    O    |      O     |   -   |
| Varela Round     | ovdrassetid://900015466 | Regular                                                                    |    -   |    O    |      O     |   -   |
| VT323            | ovdrassetid://900015266 | Regular                                                                    |    -   |    O    |      O     |   -   |

## Constructors

### fromId

Creates and returns a new Font from the Asset Id number.

#### Parameters

| `number` id              | The Asset Id of the font family.                                      |
| ------------------------ | --------------------------------------------------------------------- |
| `Enum.FontWeight` weight | The thickness of the text. Regular is used by default when omitted.   |
| `Enum.FontStyle` style   | The italic style of the text. Normal is used by default when omitted. |

#### Return

| `Font` | The created Font. |
| ------ | ----------------- |

#### Code Samples

```lua
local NewFont = Font.fromId(900000166, Enum.FontWeight.Regular, Enum.FontStyle.Normal)
```

### fromName

Creates and returns a new Font from the name of the font family.

The passed name is converted into the Asset Id of the font family internally.

**Parameters**

| `string` name            | The name of the font family.                                          |
| ------------------------ | --------------------------------------------------------------------- |
| `Enum.FontWeight` weight | The thickness of the text. Regular is used by default when omitted.   |
| `Enum.FontStyle` style   | The italic style of the text. Normal is used by default when omitted. |

**Return**

| `Font` | The created Font. |
| ------ | ----------------- |

#### Parameters

| `string` name            | The name of the font family.                                          |
| ------------------------ | --------------------------------------------------------------------- |
| `Enum.FontWeight` weight | The thickness of the text. Regular is used by default when omitted.   |
| `Enum.FontStyle` style   | The italic style of the text. Normal is used by default when omitted. |

#### Return

| `Font` | The created Font. |
| ------ | ----------------- |

#### Code Samples

```lua
local NewFont = Font.fromName("Fredoka", Enum.FontWeight.Bold, Enum.FontStyle.Normal)
```

### new

Creates and returns a new Font from the Asset Id of the font family.

#### Parameters

| `string` family          | The Asset Id of the font family.                                      |
| ------------------------ | --------------------------------------------------------------------- |
| `Enum.FontWeight` weight | The thickness of the text. Regular is used by default when omitted.   |
| `Enum.FontStyle` style   | The italic style of the text. Normal is used by default when omitted. |

#### Return

| `Font` | The created Font. |
| ------ | ----------------- |

#### Code Samples

```lua
local NewFont = Font.new("ovdrassetid://900000166", Enum.FontWeight.Bold, Enum.FontStyle.Italic)
```

## Properties

### Family

`string`

The Asset Id of the font family.

The value is displayed in the ovdrassetid:// format.

#### Code Samples

```lua
local NewFont = Font.fromName("Fredoka")
print(NewFont.Family)
```

### Style

`Enum.FontStyle`

Specifies whether the text is displayed in italic.

The default value is Normal. If the selected font family does not include an italic variation, the text is displayed without italic even when Italic is specified.

#### Code Samples

```lua
local NewFont = Font.fromName("Tomorrow")
NewFont.Style = Enum.FontStyle.Italic
```

### Weight

`Enum.FontWeight`

Specifies the thickness of the text.

The default value is Regular. If a thickness that is not included in the selected font family is specified, the closest thickness is applied instead.

When this value is SemiBold or heavier, the Bold property is updated to true.

#### Code Samples

```lua
local NewFont = Font.fromName("NotoSans")
NewFont.Weight = Enum.FontWeight.SemiBold
```

## Methods

## Events

## See also

{% content-ref url="/pages/zjNQugnDrMlHZqOsy4VP" %}
[TextLabel](/development/api-reference/classes/textlabel.md)
{% endcontent-ref %}

{% content-ref url="/pages/CTjPyf13rS5gpJ0zxpMp" %}
[TextButton](/development/api-reference/classes/textbutton.md)
{% endcontent-ref %}
