Factorio Prototype DocsVersion 1.1.107

FontPrototype - 'font' Example code

Fonts are used in all GUIs in the game.

Properties

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.

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
}

Prototypes

Types