学习
引擎数据类型
Font

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处


概要
构造工具
new(family: Content,weight: FontWeight,style: Enum.FontStyle)
fromName(name: string,weight: FontWeight,style: Enum.FontStyle)
fromId(id: number,weight: FontWeight,style: Enum.FontStyle)

API 参考
构造工具
new
Font.new(
family:Content, weight:FontWeight, style:Enum.FontStyle)
参数
family:Content
weight:FontWeight
默认值:Enum.FontWeight.Regular
默认值:Enum.FontStyle.Normal

fromEnum
Font.fromEnum(font:Enum.Font)
参数

fromName
Font.fromName(
name:string, weight:FontWeight, style:Enum.FontStyle)
参数
name:string
weight:FontWeight
默认值:Enum.FontWeight.Regular
默认值:Enum.FontStyle.Normal

fromId
Font.fromId(
id:number, weight:FontWeight, style:Enum.FontStyle)
参数
weight:FontWeight
默认值:Enum.FontWeight.Regular
默认值:Enum.FontStyle.Normal

属性
Family
Font.Family:Content

Weight
Font.Weight:FontWeight

Style
Font.Style:Enum.FontStyle

Bold
Font.Bold:boolean

©2026 Roblox Corporation、Roblox、Roblox 标志及 Powering Imagination 是我们在美国及其他国家或地区的注册与未注册商标。