Skip to main content

alphaTab.model.Font

(no description)

 class Font

Propertiesโ€‹

familiesโ€‹

Gets the font family name.

families: string[];

familyโ€‹

Deprecated

Consider using families for multi font family support.

Gets the first font family name.

family: string;

isBoldโ€‹

(no description)

readonly isBold: boolean;

isItalicโ€‹

(no description)

readonly isItalic: boolean;

sizeโ€‹

Gets the font size in pixels.

size: number;

styleโ€‹

Gets the font style.

style: FontStyle;

weightโ€‹

Gets the font weight.

weight: FontWeight;

Methodsโ€‹

fromJsonโ€‹

(no description)

static fromJson(v: unknown): Font | undefined
ParameterSummary
vAll

(no description)

toCssStringโ€‹

(no description)

toCssString(scale?: number): string
ParameterSummary
scaleAll

(no description)

toJsonโ€‹

(no description)

static toJson(font: Font | undefined): Map<string, unknown> | undefined
ParameterSummary
fontAll

(no description)

withFamilyListโ€‹

Initializes a new instance of the Font class.

static withFamilyList(families: string[], size: number, style?: FontStyle, weight?: FontWeight): Font
ParameterSummary
familiesAll

The families.

sizeAll

The size.

styleAll

The style.

weightAll

The weight.

withSizeโ€‹

(no description)

withSize(newSize: number): Font
ParameterSummary
newSizeAll

(no description)