#

API Docs for: 1.6.0
Show: Inherited Protected Private Deprecated

# BitmapFontLoader Class

Uses

- EventTarget

Defined in: `src/pixi/loaders/BitmapFontLoader.js:5`
Module: PIXI

The xml loader is used to load in XML bitmap font data ('xml' or 'fnt') To generate the data you can use http://www.angelcode.com/products/bmfont/ This loader will also load the image file as the data. When loaded this class will dispatch a 'loaded' event

## Constructor

### `BitmapFontLoader`

(

- `url`
- `crossorigin`

)

Defined in `src/pixi/loaders/BitmapFontLoader.js:5`

#### Parameters:

- `url` String

  The url of the sprite sheet JSON file

- `crossorigin` Boolean

  Whether requests should be treated as crossorigin

- Index
- Methods
- Properties

## Item Index

### Methods

- addEventListener
- dispatchEvent
- load
- onLoaded
- onXMLLoaded
- removeAllEventListeners
- removeEventListener

### Properties

- baseUrl
- baseUrl
- crossorigin
- listeners
- url

## Methods

### `addEventListener`

(

- `type`
- `listener`

)

Inherited from EventTarget: `src/pixi/utils/EventTarget.js:32`

Adds a listener for a specific event

#### Parameters:

- `type` String

  A string representing the event type to listen for.

- `listener` Function

  The callback function that will be fired when the event occurs

### `dispatchEvent`

(

- `event`

)

Inherited from EventTarget: `src/pixi/utils/EventTarget.js:55`

Fires the event, ie pretends that the event has happened

#### Parameters:

- `event` Event

  the event object

### `load`

()

Defined in `src/pixi/loaders/BitmapFontLoader.js:63`

Loads the XML font data

### `onLoaded`

() private

Defined in `src/pixi/loaders/BitmapFontLoader.js:165`

Invoked when all files are loaded (xml/fnt and texture)

### `onXMLLoaded`

() private

Defined in `src/pixi/loaders/BitmapFontLoader.js:82`

Invoked when the XML file is loaded, parses the data

### `removeAllEventListeners`

(

- `type`

)

Inherited from EventTarget: `src/pixi/utils/EventTarget.js:101`

Removes all the listeners that were active for the specified event type

#### Parameters:

- `type` String

  A string representing the event type which will have all its listeners removed

### `removeEventListener`

(

- `type`
- `listener`

)

Inherited from EventTarget: `src/pixi/utils/EventTarget.js:80`

Removes the specified listener that was assigned to the specified event type

#### Parameters:

- `type` String

  A string representing the event type which will have its listener removed

- `listener` Function

  The callback function that was be fired when the event occured

## Properties

### `baseUrl`

String

Defined in `src/pixi/loaders/BitmapFontLoader.js:42`

[read-only] The base url of the bitmap font data

### `baseUrl`

String

Defined in `src/pixi/loaders/BitmapFontLoader.js:51`

[read-only] The texture of the bitmap font

### `crossorigin`

Boolean

Defined in `src/pixi/loaders/BitmapFontLoader.js:34`

Whether the requests should be treated as cross origin

### `listeners`

Object

Inherited from EventTarget: `src/pixi/utils/EventTarget.js:24`

Holds all the listeners

### `url`

String

Defined in `src/pixi/loaders/BitmapFontLoader.js:26`

The url of the bitmap font data