core.font.create
Client
Creates a new font instance from a file path
Syntax
local instance = core.font.create(
path
)Parameters
| Type | Name | Description |
|---|---|---|
string | path | File path to a supported font asset Refer Formats section |
Returns
| Type | Name | Description |
|---|---|---|
font | instance | Created font instance |
Formats
| Format | Extension | Description |
|---|---|---|
| TrueType | .ttf | Standard scalable font format |
| OpenType | .otf | Extended scalable font format |
| Web Open Font | .woff | Compressed web font format |
| Web Open Font 2 | .woff2 | Modern compressed web font format |
Examples
local entity = core.font.create("assets/core.font.ttf")local entity = core.font.create("assets/core.font.otf")local entity = core.font.create("assets/core.font.woff2")