Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# FontPrototype - Prototype Docs

## 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 | :: boolean | Whether the font has a border.
Whether the font has a border.
filtered optional | :: boolean |
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 | :: boolean | 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 | :: boolean |
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 :: boolean optional

Default: `false`

Whether the font has a border.

### filtered :: boolean 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
    }