> For the complete documentation index, see [llms.txt](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/classes/font.md).

# Font

Functions for initialization of font for renderer. (Scripts\Fonts\\...)

### Properties:

| Name | Type                | Description      |
| ---- | ------------------- | ---------------- |
| size | integer (Read Only) | Size of the font |

### Static Functions:

#### .GetDefault

`Font.GetDefault()`: Font

Gets a default Font object.

#### .Add

`Font.Add(name: string, size: integer)`: Font

| Argument | Type    | Description       |
| -------- | ------- | ----------------- |
| name     | string  | File name of font |
| size     | integer | Size of font      |

Creates a new Font object.

### Functions:

#### .Remove

`Font_Object.Remove()`

Removes a Font object. Please note that `Font_Object` will not become null.

#### .GetTextSize

`Font_Object.GetTextSize(text: string)`: Vector2

| Argument | Type   | Description              |
| -------- | ------ | ------------------------ |
| text     | string | Text that we get size of |

Returns a Vector2 object with text size.
