Skip to content
ClassUI & Typography@public

FlxBitmapFont

Bitmap glyph font backed by a Pixi BitmapFont and registered for BitmapText.

ts
export declare class FlxBitmapFont

Constructors

ts
constructor(pixiFont: BitmapFont, ownsPixiFont?: boolean)

Constructs a new instance of the FlxBitmapFont class

ParameterTypeDescription
pixiFontBitmapFont-
ownsPixiFontboolean-

Properties

PropertyModifiersTypeDescription
destroyedreadonlyboolean-
fontFamilyreadonlystring-
lineHeightreadonlynumber-
sizereadonlynumber-

Methods

destroy()

ts
destroy(): void

Returns: void

static fromAngelCode()

ts
static fromAngelCode(source: FlxBitmapFontPageSource | readonly FlxBitmapFontPageSource[], xmlText: string, fontFamily?: string): FlxBitmapFont

Parameters:

ParameterTypeDescription
sourceFlxBitmapFontPageSource | readonly FlxBitmapFontPageSource[]-
xmlTextstring-
fontFamilystring-

Returns: FlxBitmapFont

static fromMonospace()

ts
static fromMonospace(source: FlxGraphic | Texture, letters: string | undefined, charWidth: number, charHeight: number, options?: { fontFamily?: string; spacingX?: number; spacingY?: number; }): FlxBitmapFont

Parameters:

ParameterTypeDescription
sourceFlxGraphic | Texture-
lettersstring | undefined-
charWidthnumber-
charHeightnumber-
options{ fontFamily?: string; spacingX?: number; spacingY?: number; }-

Returns: FlxBitmapFont

static getDefaultFont()

ts
static getDefaultFont(): FlxBitmapFont

Returns: FlxBitmapFont

Released under the MIT License.