diff --git a/src/text/BitmapText.js b/src/text/BitmapText.js index 898b468..f2e3237 100644 --- a/src/text/BitmapText.js +++ b/src/text/BitmapText.js @@ -164,7 +164,7 @@ if (typeof value === 'string') { value = value.split(' '); - this._style.fontName = value.slice(1).join(' '); + this._style.fontName = value.length === 1 ? value[0] : value.slice(1).join(' '); this._style.fontSize = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this.fontName].size; } else {