Table of Contents

Class LabelSettings

Provides common settings to customize the text in a Label.

Inheritance
LabelSettings

Remarks

LabelSettings is a resource that provides common settings to customize the text in a Label. It will take priority over the properties defined in theme. The resource can be shared between multiple labels and changed on the fly, so it's convenient and flexible way to setup text style.

Properties

font

Font used for the text.

var font : Font

Property Value

Font

Remarks

  • void set_font(Font value)
  • Font get_font

font_color

Color of the text.

var font_color : Color = Color(1, 1, 1, 1)

Property Value

Color

Remarks

  • void set_font_color(Color value)
  • Color get_font_color

font_size

Size of the text.

var font_size : int = 16

Property Value

int

Remarks

  • void set_font_size(int value)
  • int get_font_size

line_spacing

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.

var line_spacing : float = 3.0

Property Value

float

Remarks

  • void set_line_spacing(float value)
  • float get_line_spacing

outline_color

The color of the outline.

var outline_color : Color = Color(1, 1, 1, 1)

Property Value

Color

Remarks

  • void set_outline_color(Color value)
  • Color get_outline_color

outline_size

Text outline size.

var outline_size : int = 0

Property Value

int

Remarks

  • void set_outline_size(int value)
  • int get_outline_size

paragraph_spacing

Vertical space between paragraphs. Added on top of line_spacing.

var paragraph_spacing : float = 0.0

Property Value

float

Remarks

  • void set_paragraph_spacing(float value)
  • float get_paragraph_spacing

shadow_color

Color of the shadow effect. If alpha is 0, no shadow will be drawn.

var shadow_color : Color = Color(0, 0, 0, 0)

Property Value

Color

Remarks

  • void set_shadow_color(Color value)
  • Color get_shadow_color

shadow_offset

Offset of the shadow effect, in pixels.

var shadow_offset : Vector2 = Vector2(1, 1)

Property Value

Vector2

Remarks

shadow_size

Size of the shadow effect.

var shadow_size : int = 1

Property Value

int

Remarks

  • void set_shadow_size(int value)
  • int get_shadow_size