Open Asterune
Font

Font

Identifies a font family, weight, and style.

Behavior

Font identifies a font family, weight, and style.

Summary

Constructors2
Functions2
  • Font.fromName(name: string, weight: EnumItem?, style: EnumItem?): Font

    Creates a font using its family name and optional weight and style.

  • Font.new(family: string, weight: EnumItem?, style: EnumItem?): Font

    Creates a font from a family identifier and optional weight and style.

Members4
Properties4

Constructors

fromName

Font.fromName(name: string, weight: EnumItem?, style: EnumItem?): Font

Creates a font using its family name and optional weight and style.

new

Font.new(family: string, weight: EnumItem?, style: EnumItem?): Font

Creates a font from a family identifier and optional weight and style.

Properties

Bold

Font.Bold: boolean

Whether the selected font weight is bold.

Family

Font.Family: string

The font-family identifier.

Style

Font.Style: EnumItem

The normal or italic font style.

Weight

Font.Weight: EnumItem

The selected font weight.

Operators

__eq · __tostring · __type

Used by

TextBox · TextButton · TextLabel