Roblox UtilitiesDevlHub Roblox Documentation

Data type

Font

Describes the font used to render text.

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.

Name Asset ID / Weights / Appearance
Accanthis ADF Std rbxasset://fonts/families/AccanthisADFStd.json

Amatic SC rbxasset://fonts/families/AmaticSC.json

Arimo rbxasset://fonts/families/Arimo.json

Balthazar rbxasset://fonts/families/Balthazar.json

Bangers rbxasset://fonts/families/Bangers.json

Builder Extended rbxasset://fonts/families/BuilderExtended.json

Builder Mono rbxasset://fonts/families/BuilderMono.json

Builder Sans rbxasset://fonts/families/BuilderSans.json

Comic Neue Angular rbxasset://fonts/families/ComicNeueAngular.json

Creepster rbxasset://fonts/families/Creepster.json

Denk One rbxasset://fonts/families/DenkOne.json

Fondamento rbxasset://fonts/families/Fondamento.json

Fredoka One rbxasset://fonts/families/FredokaOne.json

Grenze Gotisch rbxasset://fonts/families/GrenzeGotisch.json

Guru rbxasset://fonts/families/Guru.json

Highway Gothic rbxasset://fonts/families/HighwayGothic.json

Inconsolata rbxasset://fonts/families/Inconsolata.json

Indie Flower rbxasset://fonts/families/IndieFlower.json

Josefin Sans rbxasset://fonts/families/JosefinSans.json

Jura rbxasset://fonts/families/Jura.json

Kalam rbxasset://fonts/families/Kalam.json

Luckiest Guy rbxasset://fonts/families/LuckiestGuy.json

Merriweather rbxasset://fonts/families/Merriweather.json

Michroma rbxasset://fonts/families/Michroma.json

Montserrat rbxasset://fonts/families/Montserrat.json

Nunito rbxasset://fonts/families/Nunito.json

Oswald rbxasset://fonts/families/Oswald.json

Patrick Hand rbxasset://fonts/families/PatrickHand.json

Permanent Marker rbxasset://fonts/families/PermanentMarker.json

Press Start 2P rbxasset://fonts/families/PressStart2P.json

Roboto rbxasset://fonts/families/Roboto.json

Roboto Condensed rbxasset://fonts/families/RobotoCondensed.json

Roboto Mono rbxasset://fonts/families/RobotoMono.json

Roman Antique rbxasset://fonts/families/RomanAntique.json

Sarpanch rbxasset://fonts/families/Sarpanch.json

Source Sans Pro rbxasset://fonts/families/SourceSansPro.json

Special Elite rbxasset://fonts/families/SpecialElite.json

Titillium Web rbxasset://fonts/families/TitilliumWeb.json

Ubuntu rbxasset://fonts/families/Ubuntu.json

Zekton rbxasset://fonts/families/Zekton.json

Constructors 4#

newCreates a new Font.
fromEnumCreates a Font from an Font value.
fromNameCreates a Font from a name like FredokaOne.
fromIdCreates a Font from a numerical asset ID.

new(family: Content, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)#

Creates a new Font.

NameTypeDefaultDescription
familyContentThe asset ID for the font family, starting with rbxasset:// or rbxassetid://.
weightFontWeightEnum.FontWeight.RegularHow thick the text is.
styleFontStyleEnum.FontStyle.NormalWhether the text is normal or italic.

fromEnum(font: Font)#

Creates a Font from an Font value. Throws an error when called with Font.Unknown.

The following table indicates how each Font value maps to a font Family.

Font Enums Equivalent Family
Enum.Font.AmaticSC|AmaticSC rbxasset://fonts/families/AmaticSC.json
Enum.Font.Antique|Antique rbxasset://fonts/families/RomanAntique.json
Enum.Font.Arcade|Arcade rbxasset://fonts/families/PressStart2P.json
Enum.Font.Arimo|Arimo, Enum.Font.ArimoBold|ArimoBold rbxasset://fonts/families/Arimo.json
Enum.Font.Bangers|Bangers rbxasset://fonts/families/Bangers.json
Enum.Font.Bodoni|Bodoni rbxasset://fonts/families/AccanthisADFStd.json
Enum.Font.BuilderSans|BuilderSans, Enum.Font.BuilderSansMedium|BuilderSansMedium, Enum.Font.BuilderSansBold|BuilderSansBold, Enum.Font.BuilderSansExtraBold|BuilderSansExtraBold rbxasset://fonts/families/BuilderSans.json
Enum.Font.Cartoon|Cartoon rbxasset://fonts/families/ComicNeueAngular.json
Enum.Font.Code|Code rbxasset://fonts/families/Inconsolata.json
Enum.Font.Creepster|Creepster rbxasset://fonts/families/Creepster.json
Enum.Font.DenkOne|DenkOne rbxasset://fonts/families/DenkOne.json
Enum.Font.Fantasy|Fantasy rbxasset://fonts/families/Balthazar.json
Enum.Font.Fondamento|Fondamento rbxasset://fonts/families/Fondamento.json
Enum.Font.FredokaOne|FredokaOne rbxasset://fonts/families/FredokaOne.json
Enum.Font.Garamond|Garamond rbxasset://fonts/families/Guru.json
Enum.Font.GrenzeGotisch|GrenzeGotisch rbxasset://fonts/families/GrenzeGotisch.json
Enum.Font.Highway|Highway rbxasset://fonts/families/HighwayGothic.json
Enum.Font.IndieFlower|IndieFlower rbxasset://fonts/families/IndieFlower.json
Enum.Font.JosefinSans|JosefinSans rbxasset://fonts/families/JosefinSans.json
Enum.Font.Jura|Jura rbxasset://fonts/families/Jura.json
Enum.Font.Kalam|Kalam rbxasset://fonts/families/Kalam.json
Enum.Font.Legacy|Legacy rbxasset://fonts/families/LegacyArial.json
Enum.Font.LuckiestGuy|LuckiestGuy rbxasset://fonts/families/LuckiestGuy.json
Enum.Font.Merriweather|Merriweather rbxasset://fonts/families/Merriweather.json
Enum.Font.Michroma|Michroma rbxasset://fonts/families/Michroma.json
Enum.Font.Nunito|Nunito rbxasset://fonts/families/Nunito.json
Enum.Font.Oswald|Oswald rbxasset://fonts/families/Oswald.json
Enum.Font.PatrickHand|PatrickHand rbxasset://fonts/families/PatrickHand.json
Enum.Font.PermanentMarker|PermanentMarker rbxasset://fonts/families/PermanentMarker.json
Enum.Font.Roboto|Roboto rbxasset://fonts/families/Roboto.json
Enum.Font.RobotoCondensed|RobotoCondensed rbxasset://fonts/families/RobotoCondensed.json
Enum.Font.RobotoMono|RobotoMono rbxasset://fonts/families/RobotoMono.json
Enum.Font.Sarpanch|Sarpanch rbxasset://fonts/families/Sarpanch.json
Enum.Font.SciFi|SciFi rbxasset://fonts/families/Zekton.json
Enum.Font.SourceSans|SourceSans, Enum.Font.SourceSansBold|SourceSansBold, Enum.Font.SourceSansItalic|SourceSansItalic, Enum.Font.SourceSansLight|SourceSansLight, Enum.Font.SourceSansSemibold|SourceSansSemibold rbxasset://fonts/families/SourceSansPro.json
Enum.Font.SpecialElite|SpecialElite rbxasset://fonts/families/SpecialElite.json
Enum.Font.TitilliumWeb|TitilliumWeb rbxasset://fonts/families/TitilliumWeb.json
Enum.Font.Ubuntu|Ubuntu rbxasset://fonts/families/Ubuntu.json
NameTypeDefaultDescription
fontFontThe enum value of the font to use.

fromName(name: string, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)#

This is a convenience method for creating fonts from the content folder. The name you pass in will be converted into an asset ID like rbxasset://fonts/families/BuilderSans.json.

The name can only contain alphabetical characters, digits, _ (underscore), and - (hyphen). It can't contain any spaces.

NameTypeDefaultDescription
namestringThe name of the font.
weightFontWeightEnum.FontWeight.RegularHow thick the text is.
styleFontStyleEnum.FontStyle.NormalWhether the text is normal or italic.

fromId(id: number, weight: FontWeight = Enum.FontWeight.Regular, style: FontStyle = Enum.FontStyle.Normal)#

This is a convenience method for creating fonts from an asset ID number.

NameTypeDefaultDescription
idnumberThe asset ID of the font as a number.
weightFontWeightEnum.FontWeight.RegularHow thick the text is.
styleFontStyleEnum.FontStyle.NormalWhether the text is normal or italic.

Properties 4#

FamilyContentThe asset ID for the font family.
WeightFontWeightHow thick the text is.
StyleFontStyleWhether the font is italic.
BoldboolWhether the font is bold.

Family: Content#

The asset ID for the font family. These start with either rbxasset:// or rbxassetid://.

Weight: FontWeight#

How thick the text is. The default value is FontWeight.Regular.

When set, Font.Bold is updated and becomes true if the weight is FontWeight.SemiBold or thicker.

Style: FontStyle#

Whether the font is italic. The default value is FontStyle.Normal.

Bold: bool#

Whether the font is bold. Sets Font.Weight to FontWeight.Bold when true, or to FontWeight.Regular otherwise.