Font
Describes the font used to render text. Every font consists of a font family (like Source Sans Pro), a weight like Enum.FontWeight.Bold, and a style like Enum.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, and TextBox.FontFace properties.
See also Enum.Font as an older alternative to this datatype that is required by some methods and properties (note that most fonts cannot be represented with this enum).
Font List
Name | Asset ID | Weights |
---|---|---|
Accanthis ADF Std | rbxasset://fonts/families/AccanthisADFStd.json | Regular |
Amatic SC | rbxasset://fonts/families/AmaticSC.json | Regular, Bold |
Arial | rbxasset://fonts/families/Arial.json | Regular, Bold |
Arial (Legacy) | rbxasset://fonts/families/LegacyArial.json | Regular, Bold |
Arimo | rbxasset://fonts/families/Arimo.json | Regular, Medium, Semi Bold, Bold |
Balthazar | rbxasset://fonts/families/Balthazar.json | Regular |
Bangers | rbxasset://fonts/families/Bangers.json | Regular |
Builder Sans | rbxasset://fonts/families/BuilderSans.json | Thin, Light, Regular, medium, Semi Bold, Bold, Extra Bold |
Comic Neue Angular | rbxasset://fonts/families/ComicNeueAngular.json | Bold |
Creepster | rbxasset://fonts/families/Creepster.json | Regular |
Denk One | rbxasset://fonts/families/DenkOne.json | Regular |
Fondamento | rbxasset://fonts/families/Fondamento.json | Regular |
Fredoka One | rbxasset://fonts/families/FredokaOne.json | Regular |
Gotham SSm | rbxasset://fonts/families/GothamSSm.json | Book, Medium, Bold, Black |
Grenze Gotisch | rbxasset://fonts/families/GrenzeGotisch.json | Thin, Extra Light, Light, Regular, Medium, Semi Bold, Bold, Extra Bold, Black |
Guru | rbxasset://fonts/families/Guru.json | Regular |
Highway Gothic | rbxasset://fonts/families/HighwayGothic.json | Regular |
Inconsolata | rbxasset://fonts/families/Inconsolata.json | Extra Light, Light, Regular, Medium, Semi Bold, Bold, Extra Bold, Black |
Indie Flower | rbxasset://fonts/families/IndieFlower.json | Regular |
Josefin Sans | rbxasset://fonts/families/JosefinSans.json | Thin, Extra Light, Light, Regular, Medium, Semi Bold, Bold |
Jura | rbxasset://fonts/families/Jura.json | Light, Regular, Medium, Semi Bold, Bold |
Kalam | rbxasset://fonts/families/Kalam.json | Light, Regular, Bold |
Luckiest Guy | rbxasset://fonts/families/LuckiestGuy.json | Regular |
Merriweather | rbxasset://fonts/families/Merriweather.json | Light, Regular, Bold, Black |
Michroma | rbxasset://fonts/families/Michroma.json | Regular |
Montserrat | rbxasset://fonts/families/Montserrat.json | Thin, Extra Light, Light, Regular, Mediu, Semi Bold, Bold, Black |
Nunito | rbxasset://fonts/families/Nunito.json | Extra Light, Light, Regular, Semi Bold, Bold, Extra Bold, Black |
Oswald | rbxasset://fonts/families/Oswald.json | Extra Light, Light, Regular, Medium, Semi Bold, Bold |
Patrick Hand | rbxasset://fonts/families/PatrickHand.json | Regular |
Permanent Marker | rbxasset://fonts/families/PermanentMarker.json | Regular |
Press Start 2P | rbxasset://fonts/families/PressStart2P.json | Regular |
Roboto | rbxasset://fonts/families/Roboto.json | Thin, Light, Regular, Medium, Bold, Black |
Roboto Condensed | rbxasset://fonts/families/RobotoCondensed.json | Light, Regular, Bold |
Roboto Mono | rbxasset://fonts/families/RobotoMono.json | Thin, Extra Light, Light, Regular, Medium, Semi Bold, Bold |
Roman Antique | rbxasset://fonts/families/RomanAntique.json | Regular |
Sarpanch | rbxasset://fonts/families/Sarpanch.json | Regular, Medium, Semi Bold, Bold, Extra Bold, Black |
Source Sans Pro | rbxasset://fonts/families/SourceSansPro.json | Extra Light, Light, Regular, Semi Bold, Bold, Black |
Special Elite | rbxasset://fonts/families/SpecialElite.json | Regular |
Titillium Web | rbxasset://fonts/families/TitilliumWeb.json | Extra Light, Light, Regular, Semi Bold, Bold, Black |
Ubuntu | rbxasset://fonts/families/Ubuntu.json | Light, Regular, Medium, Bold |
Zekton | rbxasset://fonts/families/Zekton.json | Regular |
Summary
Constructors
- new(family : Content,weight : Enum.FontWeight,style : Enum.FontStyle)
Creates a new Font.
- fromName(name : string,weight : Enum.FontWeight,style : Enum.FontStyle)
Creates a Font from a name like FredokaOne.
- fromId(id : number,weight : Enum.FontWeight,style : Enum.FontStyle)
Creates a Font from a numerical asset ID.
Properties
The asset ID for the font family.
How thick the text is.
Whether the font is italic.
Whether the font is bold.
Constructors
new
Creates a new Font.
Parameters
The asset ID for the font family, starting with rbxasset:// or rbxassetid://.
How thick the text is.
Whether the text is normal or italic.
Code Samples
Shows how to use Font.new().
script.Parent.FontFace = Font.new("rbxasset://fonts/families/Roboto.json", Enum.FontWeight.Light)
fromEnum
Creates a Font from an Enum.Font value. Throws an error when called with Enum.Font.Unknown.
The following table indicates the family, weight, and style associated with each Enum.Font.
Font Enum | Family | Weight | Style |
---|---|---|---|
AmaticSC | rbxasset://fonts/families/AmaticSC.json | Regular | Normal |
Antique | rbxasset://fonts/families/RomanAntique.json | Regular | Normal |
Arcade | rbxasset://fonts/families/PressStart2P.json | Regular | Normal |
Arial | rbxasset://fonts/families/Arial.json | Regular | Normal |
ArialBold | rbxasset://fonts/families/Arial.json | Bold | Normal |
Arimo | rbxasset://fonts/families/Arimo.json | Regular | Normal |
ArimoBold | rbxasset://fonts/families/Arimo.json | Bold | Normal |
Bangers | rbxasset://fonts/families/Bangers.json | Regular | Normal |
Bodoni | rbxasset://fonts/families/AccanthisADFStd.json | Regular | Normal |
BuilderSans | rbxasset://fonts/families/BuilderSans.json | Regular | Normal |
BuilderSansMedium | rbxasset://fonts/families/BuilderSans.json | Medium | Normal |
BuilderSansBold | rbxasset://fonts/families/BuilderSans.json | Bold | Normal |
BuilderSansExtraBold | rbxasset://fonts/families/BuilderSans.json | ExtraBold | Normal |
Cartoon | rbxasset://fonts/families/ComicNeueAngular.json | Regular | Normal |
Code | rbxasset://fonts/families/Inconsolata.json | Regular | Normal |
Creepster | rbxasset://fonts/families/Creepster.json | Regular | Normal |
DenkOne | rbxasset://fonts/families/DenkOne.json | Regular | Normal |
Fantasy | rbxasset://fonts/families/Balthazar.json | Regular | Normal |
Fondamento | rbxasset://fonts/families/Fondamento.json | Regular | Normal |
FredokaOne | rbxasset://fonts/families/FredokaOne.json | Regular | Normal |
Garamond | rbxasset://fonts/families/Guru.json | Regular | Normal |
Gotham | rbxasset://fonts/families/GothamSSm.json | Regular | Normal |
GothamBlack | rbxasset://fonts/families/GothamSSm.json | Heavy | Normal |
GothamBold | rbxasset://fonts/families/GothamSSm.json | Bold | Normal |
GothamMedium | rbxasset://fonts/families/GothamSSm.json | Medium | Normal |
GrenzeGotisch | rbxasset://fonts/families/GrenzeGotisch.json | Regular | Normal |
Highway | rbxasset://fonts/families/HighwayGothic.json | Regular | Normal |
IndieFlower | rbxasset://fonts/families/IndieFlower.json | Regular | Normal |
JosefinSans | rbxasset://fonts/families/JosefinSans.json | Regular | Normal |
Jura | rbxasset://fonts/families/Jura.json | Regular | Normal |
Kalam | rbxasset://fonts/families/Kalam.json | Regular | Normal |
Legacy | rbxasset://fonts/families/LegacyArial.json | Regular | Normal |
LuckiestGuy | rbxasset://fonts/families/LuckiestGuy.json | Regular | Normal |
Merriweather | rbxasset://fonts/families/Merriweather.json | Regular | Normal |
Michroma | rbxasset://fonts/families/Michroma.json | Regular | Normal |
Nunito | rbxasset://fonts/families/Nunito.json | Regular | Normal |
Oswald | rbxasset://fonts/families/Oswald.json | Regular | Normal |
PatrickHand | rbxasset://fonts/families/PatrickHand.json | Regular | Normal |
PermanentMarker | rbxasset://fonts/families/PermanentMarker.json | Regular | Normal |
Roboto | rbxasset://fonts/families/Roboto.json | Regular | Normal |
RobotoCondensed | rbxasset://fonts/families/RobotoCondensed.json | Regular | Normal |
RobotoMono | rbxasset://fonts/families/RobotoMono.json | Regular | Normal |
Sarpanch | rbxasset://fonts/families/Sarpanch.json | Regular | Normal |
SciFi | rbxasset://fonts/families/Zekton.json | Regular | Normal |
SourceSans | rbxasset://fonts/families/SourceSansPro.json | Regular | Normal |
SourceSansBold | rbxasset://fonts/families/SourceSansPro.json | Bold | Normal |
SourceSansItalic | rbxasset://fonts/families/SourceSansPro.json | Regular | Italic |
SourceSansLight | rbxasset://fonts/families/SourceSansPro.json | Light | Normal |
SourceSansSemibold | rbxasset://fonts/families/SourceSansPro.json | SemiBold | Normal |
SpecialElite | rbxasset://fonts/families/SpecialElite.json | Regular | Normal |
TitilliumWeb | rbxasset://fonts/families/TitilliumWeb.json | Regular | Normal |
Ubuntu | rbxasset://fonts/families/Ubuntu.json | Regular | Normal |
Parameters
The enum value of the font to use.
Code Samples
Shows how to use Font.fromEnum().
script.Parent.FontFace = Font.fromEnum(Enum.Font.SciFi)
print(script.Parent.FontFace)
fromName
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/YourFontNameHere.json.
The name can only contain alphabetical characters, digits, _ (underscore), and - (hyphen). It can't contain any spaces.
Parameters
The name of the font.
How thick the text is.
Whether the text is normal or italic.
Code Samples
Shows how to use Font.fromName().
script.Parent.FontFace = Font.fromName("FredokaOne")
print(script.Parent.FontFace.Family)
fromId
This is a convenience method for creating fonts from an asset ID number.
Parameters
The asset ID of the font as a number.
How thick the text is.
Whether the text is normal or italic.
Code Samples
Shows how to use Font.fromId().
script.Parent.FontFace = Font.fromId(8836875837)
print(script.Parent.FontFace.Family)
Properties
Family
The asset ID for the font family. These start with either rbxasset:// or rbxassetid://.
Weight
How thick the text is. The default value is Enum.FontWeight.Regular.
When set, Font.Bold is updated. Bold is true if the weight is Enum.FontWeight.SemiBold or thicker.
Style
Whether the font is italic. The default value is Enum.FontStyle.Normal. The font can be made italic (like this) using Enum.FontStyle.Italic.
Bold
Whether the font is bold. Sets Font.Weight to Enum.FontWeight.Bold when true, and Enum.FontWeight.Regular otherwise.