Font

字体类用于定义2D文本符号和3D文本符号的字体样式。

构造函数

Font

字体类用于定义2D文本符号和3D文本符号的字体样式。

new Font(properties?)

参数

返回:Font Font对象

属性

decoration

文本装饰样式。

decoration: "none" | "underline" | "line-through"

类型: "none" | "underline" | "line-through"

family

文本的字体族名称。

family: string

类型: string

style

文本的字体样式。

style: "normal" | "italic" | "oblique"

类型: "normal" | "italic" | "oblique"

weight

文本的字体粗细。

weight: "lighter" | "normal" | "bold" | "bolder"

类型: "lighter" | "normal" | "bold" | "bolder"

访问器

size

字体大小(以点为单位)。

get size(): number

返回: number 字体大小(以点为单位)。

set size(value: string | number): void

参数

  • value: string | number

返回: void

方法

clone

创建字体对象的深度克隆。

clone(): Font

返回:Font

toJSON

将字体对象转换为 JSON 格式。

toJSON(): any

返回:any

BIMFlux AI