Data type
Font
Describes the font used to render text.
About Font
Describes the font used to render text. Every font consists of a font
family, a weight like FontWeight.Bold, and a style like
FontStyle.Italic.
Font families are a type of asset, like images or meshes. Each font family contains a number of font faces, and each face has a different weight and style.
Font is used by the TextLabel.FontFace,
TextButton.FontFace, TextBox.FontFace, and similar properties.
See also Font as an older alternative to this datatype that is required
by some methods and properties.
Constructors 4
Font.new
(family: Content, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)Creates a newFont.Font.fromName
(name: string, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)Creates aFontfrom a name likeFredokaOne.Font.fromId
(id: number, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)Creates aFontfrom a numerical asset ID.
Properties 4
Family
: ContentThe asset ID for the font family.The asset ID for the font family. These start with either
rbxasset://orrbxassetid://.Weight
: FontWeightHow thick the text is.How thick the text is. The default value is
FontWeight.Regular.When set,
Font.Boldis updated and becomestrueif the weight isFontWeight.SemiBoldor thicker.Style
: FontStyleWhether the font is italic.Whether the font is italic. The default value is
FontStyle.Normal.Bold
: boolWhether the font is bold.Whether the font is bold. Sets
Font.WeighttoFontWeight.Boldwhentrue, or toFontWeight.Regularotherwise.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.