diff --git a/src/style/CharacterStyle.js b/src/style/CharacterStyle.js index 10df46c6..b59faab0 100644 --- a/src/style/CharacterStyle.js +++ b/src/style/CharacterStyle.js @@ -78,6 +78,7 @@ var CharacterStyle = this.CharacterStyle = PathStyle.extend(/** @lends Character }, getFontStyle: function() { - return this._fontSize + 'px ' + this._font; + var size = this._fontSize; + return (/[a-z]/i.test(size) ? size + ' ' : size + 'px ') + this._font; } });