Prototype/Font: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(This doesnt inherit from prototype... isnt that great?)
(0.16)
Line 15: Line 15:


=== size ===
=== size ===
'''Type''': [[Types/uint]]
'''Type''': [[Types/int32]]


Size of the font.
Size of the font.
Line 23: Line 23:


== Optional properties ==
== Optional properties ==
=== spacing ===
'''Type''': [[Types/float]]
'''Default''': 0
=== scale_font ===
'''Type''': [[Types/bool]]
'''Default''': true


=== border ===
=== border ===
'''Type''': [[Types/bool]]
'''Type''': [[Types/bool]]
'''Default''': false


Whether the font has a border.
Whether the font has a border.
=== filtered ===
'''Type''': [[Types/bool]]
'''Default''': false


=== border_color ===
=== border_color ===
'''Type''': [[Types/color]]
'''Type''': [[Types/Color]]


The color of the border, if enabled.
The color of the border, if enabled.

Revision as of 16:15, 19 May 2018

Basics

Fonts are used in all gui in the game.

Mandatory properties

type

Type: Types/string

Must be "font".

name

Type: Types/string

Name of the font.

size

Type: Types/int32

Size of the font.

from

Type: Types/string

Optional properties

spacing

Type: Types/float

Default: 0

scale_font

Type: Types/bool

Default: true

border

Type: Types/bool

Default: false

Whether the font has a border.

filtered

Type: Types/bool

Default: false

border_color

Type: Types/Color

The color of the border, if enabled.

Example

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