Class: BitmapFont

BitmapFont

A BitmapFont object represents a particular font face, size, and style.

Members

url string

the url of the font

Methods

install (options) static

Generates a bitmap-font for the given style and character set

Name Type Description
options BitmapFontInstallOptions

Setup options for font generation.

Returns:
Font generated by style options.
Example
 import { BitmapFont, BitmapText } from 'pixi.js';

 BitmapFont.install('TitleFont', {
     fontFamily: 'Arial',
     fontSize: 12,
     strokeThickness: 2,
     fill: 'purple',
 });

 const title = new BitmapText({ text: 'This is the title', fontFamily: 'TitleFont' });

uninstall (name) static

Uninstalls a bitmap font from the cache.

Name Type Description
name string

The name of the bitmap font to uninstall.

destroy () void

Destroys the BitmapFont object.