Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## FontPrototype 'font' Example code

Fonts are used in all GUIs in the game.

## Properties

- default
- sorted

type | :: `"font"` |
name | :: string | Name of the font.
Name of the font.
size | :: int32 | Size of the font.
Size of the font.
from | :: string | The name of the fonts .ttf descriptor. [...]
The name of the fonts .ttf descriptor. [...]
spacing optional | :: float |
border optional | :: bool | Whether the font has a border.
Whether the font has a border.
filtered optional | :: bool |
border_color optional | :: Color | The color of the border, if enabled.
The color of the border, if enabled.

from | :: string | The name of the fonts .ttf descriptor. [...]
The name of the fonts .ttf descriptor. [...]
name | :: string | Name of the font.
Name of the font.
size | :: int32 | Size of the font.
Size of the font.
type | :: `"font"` |
border optional | :: bool | Whether the font has a border.
Whether the font has a border.
border_color optional | :: Color | The color of the border, if enabled.
The color of the border, if enabled.
filtered optional | :: bool |
spacing optional | :: float |

## Properties

### type :: `"font"`

### name :: string

Name of the font.

### size :: int32

Size of the font.

### from :: string

The name of the fonts .ttf descriptor. This descriptor must be defined in the locale info.json. Refer to `data/core/locale/_language_/info.json` for examples.

### spacing :: float optional

Default: `0`

### border :: bool optional

Default: `false`

Whether the font has a border.

### filtered :: bool optional

Default: `false`

### border_color :: Color optional

The color of the border, if enabled.

## Example

    {
      type = "font",
      name = "default-button",
      from = "default-bold",
      size = 18
    }