Interface IBitmapFontOptions

Memberof

PIXI

interface IBitmapFontOptions {
    alphaMode?: ALPHA_MODES;
    anisotropicLevel?: number;
    chars?: string | (string | string[])[];
    mipmap?: MIPMAP_MODES;
    padding?: number;
    resolution?: number;
    scaleMode?: SCALE_MODES;
    skipKerning?: boolean;
    textureHeight?: number;
    textureWidth?: number;
}

Hierarchy

  • BaseOptions
    • IBitmapFontOptions

Properties

alphaMode?: ALPHA_MODES

Pre multiply the image alpha. Note: for MSDF/SDF fonts, alphaMode is not supported.

Default

PIXI.BaseTexture.defaultOptions.alphaMode
anisotropicLevel?: number

Anisotropic filtering level of texture.

Default

PIXI.BaseTexture.defaultOptions.anisotropicLevel
chars?: string | (string | string[])[]

Characters included in the font set. You can also use ranges. For example, [['a', 'z'], ['A', 'Z'], "!@#$%^&*()~{}[] "]. Don't forget to include spaces ' ' in your character set!

Default

PIXI.BitmapFont.ALPHANUMERIC
mipmap?: MIPMAP_MODES

If mipmapping is enabled for texture. For instance, by default PixiJS only enables mipmapping on Power-of-Two textures. If your textureWidth or textureHeight are not power-of-two, you may consider enabling mipmapping to get better quality with lower font sizes. Note: for MSDF/SDF fonts, mipmapping is not supported.

Default

PIXI.BaseTexture.defaultOptions.mipmap
padding?: number

Padding between glyphs on texture atlas. Lower values could mean more visual artifacts and bleeding from other glyphs, larger values increase the space required on the texture.

Default

4
resolution?: number

Render resolution for glyphs.

Default

1
scaleMode?: SCALE_MODES

Default scale mode, linear, nearest. Nearest can be helpful for bitmap-style fonts.

Default

PIXI.BaseTexture.defaultOptions.scaleMode
skipKerning?: boolean

Skip generation of kerning information for the BitmapFont. If true, this could potentially increase the performance, but may impact the rendered text appearance.

Default

false
textureHeight?: number

Optional height of atlas, smaller values to reduce memory.

Default

512
textureWidth?: number

Optional width of atlas, smaller values to reduce memory.

Default

512

Generated using TypeDoc