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.

Font List

NameAsset IDWeights
Accanthis ADF Stdrbxasset://fonts/families/AccanthisADFStd.jsonRegular
Amatic SCrbxasset://fonts/families/AmaticSC.jsonRegular, Bold
Arialrbxasset://fonts/families/Arial.jsonRegular, Bold
Arial (Legacy)rbxasset://fonts/families/LegacyArial.jsonRegular, Bold
Arimorbxasset://fonts/families/Arimo.jsonRegular, Medium, Semi Bold, Bold
Balthazarrbxasset://fonts/families/Balthazar.jsonRegular
Bangersrbxasset://fonts/families/Bangers.jsonRegular
Builder Sansrbxasset://fonts/families/BuilderSans.jsonThin, Light, Regular, medium, Semi Bold, Bold, Extra Bold
Comic Neue Angularrbxasset://fonts/families/ComicNeueAngular.jsonBold
Creepsterrbxasset://fonts/families/Creepster.jsonRegular
Denk Onerbxasset://fonts/families/DenkOne.jsonRegular
Fondamentorbxasset://fonts/families/Fondamento.jsonRegular
Fredoka Onerbxasset://fonts/families/FredokaOne.jsonRegular
Gotham SSmrbxasset://fonts/families/GothamSSm.jsonBook, Medium, Bold, Black
Grenze Gotischrbxasset://fonts/families/GrenzeGotisch.jsonThin, Extra Light, Light, Regular, Medium, Semi Bold, Bold, Extra Bold, Black
Gururbxasset://fonts/families/Guru.jsonRegular
Highway Gothicrbxasset://fonts/families/HighwayGothic.jsonRegular
Inconsolatarbxasset://fonts/families/Inconsolata.jsonExtra Light, Light, Regular, Medium, Semi Bold, Bold, Extra Bold, Black
Indie Flowerrbxasset://fonts/families/IndieFlower.jsonRegular
Josefin Sansrbxasset://fonts/families/JosefinSans.jsonThin, Extra Light, Light, Regular, Medium, Semi Bold, Bold
Jurarbxasset://fonts/families/Jura.jsonLight, Regular, Medium, Semi Bold, Bold
Kalamrbxasset://fonts/families/Kalam.jsonLight, Regular, Bold
Luckiest Guyrbxasset://fonts/families/LuckiestGuy.jsonRegular
Merriweatherrbxasset://fonts/families/Merriweather.jsonLight, Regular, Bold, Black
Michromarbxasset://fonts/families/Michroma.jsonRegular
Montserratrbxasset://fonts/families/Montserrat.jsonThin, Extra Light, Light, Regular, Mediu, Semi Bold, Bold, Black
Nunitorbxasset://fonts/families/Nunito.jsonExtra Light, Light, Regular, Semi Bold, Bold, Extra Bold, Black
Oswaldrbxasset://fonts/families/Oswald.jsonExtra Light, Light, Regular, Medium, Semi Bold, Bold
Patrick Handrbxasset://fonts/families/PatrickHand.jsonRegular
Permanent Markerrbxasset://fonts/families/PermanentMarker.jsonRegular
Press Start 2Prbxasset://fonts/families/PressStart2P.jsonRegular
Robotorbxasset://fonts/families/Roboto.jsonThin, Light, Regular, Medium, Bold, Black
Roboto Condensedrbxasset://fonts/families/RobotoCondensed.jsonLight, Regular, Bold
Roboto Monorbxasset://fonts/families/RobotoMono.jsonThin, Extra Light, Light, Regular, Medium, Semi Bold, Bold
Roman Antiquerbxasset://fonts/families/RomanAntique.jsonRegular
Sarpanchrbxasset://fonts/families/Sarpanch.jsonRegular, Medium, Semi Bold, Bold, Extra Bold, Black
Source Sans Prorbxasset://fonts/families/SourceSansPro.jsonExtra Light, Light, Regular, Semi Bold, Bold, Black
Special Eliterbxasset://fonts/families/SpecialElite.jsonRegular
Titillium Webrbxasset://fonts/families/TitilliumWeb.jsonExtra Light, Light, Regular, Semi Bold, Bold, Black
Ubunturbxasset://fonts/families/Ubuntu.jsonLight, Regular, Medium, Bold
Zektonrbxasset://fonts/families/Zekton.jsonRegular

概要

建構子

屬性

建構子

new

參數

family: Content
預設值:Enum.FontWeight.Regular
預設值:Enum.FontStyle.Normal

範例程式碼

Font.new()

script.Parent.FontFace = Font.new("rbxasset://fonts/families/Roboto.json", Enum.FontWeight.Light)

fromEnum

參數

font: Enum.Font

範例程式碼

Font.fromEnum()

script.Parent.FontFace = Font.fromEnum(Enum.Font.SciFi)
print(script.Parent.FontFace)

fromName

參數

name: string
預設值:Enum.FontWeight.Regular
預設值:Enum.FontStyle.Normal

範例程式碼

Font.fromName()

script.Parent.FontFace = Font.fromName("FredokaOne")
print(script.Parent.FontFace.Family)

fromId

參數

id: number
預設值:Enum.FontWeight.Regular
預設值:Enum.FontStyle.Normal

範例程式碼

Font.fromId()

script.Parent.FontFace = Font.fromId(8836875837)
print(script.Parent.FontFace.Family)

屬性

Family

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

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.

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.