ClassUI & Typography@public
FlxBitmapFont
Bitmap glyph font backed by a Pixi BitmapFont and registered for BitmapText.
ts
export declare class FlxBitmapFontConstructors
ts
constructor(pixiFont: BitmapFont, ownsPixiFont?: boolean)Constructs a new instance of the FlxBitmapFont class
| Parameter | Type | Description |
|---|---|---|
pixiFont | BitmapFont | - |
ownsPixiFont | boolean | - |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
destroyed | readonly | boolean | - |
fontFamily | readonly | string | - |
lineHeight | readonly | number | - |
size | readonly | number | - |
Methods
destroy()
ts
destroy(): voidReturns: void
static fromAngelCode()
ts
static fromAngelCode(source: FlxBitmapFontPageSource | readonly FlxBitmapFontPageSource[], xmlText: string, fontFamily?: string): FlxBitmapFontParameters:
| Parameter | Type | Description |
|---|---|---|
source | FlxBitmapFontPageSource | readonly FlxBitmapFontPageSource[] | - |
xmlText | string | - |
fontFamily | string | - |
Returns: FlxBitmapFont
static fromMonospace()
ts
static fromMonospace(source: FlxGraphic | Texture, letters: string | undefined, charWidth: number, charHeight: number, options?: { fontFamily?: string; spacingX?: number; spacingY?: number; }): FlxBitmapFontParameters:
| Parameter | Type | Description |
|---|---|---|
source | FlxGraphic | Texture | - |
letters | string | undefined | - |
charWidth | number | - |
charHeight | number | - |
options | { fontFamily?: string; spacingX?: number; spacingY?: number; } | - |
Returns: FlxBitmapFont
static getDefaultFont()
ts
static getDefaultFont(): FlxBitmapFontReturns: FlxBitmapFont