phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
http://phaser.io
MIT License
1.34k stars 491 forks source link

Fix for BitmapFont loading issue when kerning is defined for a non-existing character #598

Closed rroylance closed 5 years ago

rroylance commented 5 years ago

Fixed issue causing BitmapFont to fail loading if a kerning value for a character that doesn't exist in the font is defined in the xml/json.

This PR

Describe the changes below: Simply adds an existence check before attempting to access the character data for a character that may or may not exist.