File tree Expand file tree Collapse file tree
src/gameobjects/bitmaptext/static Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,6 +173,27 @@ var BitmapText = new Class({
173173 return this ;
174174 } ,
175175
176+ /**
177+ * Sets the letter spacing between each character of this Bitmap Text.
178+ * Can be a positive value to increase the space, or negative to reduce it.
179+ * Spacing is applied after the kerning values have been set.
180+ *
181+ * @method Phaser.GameObjects.BitmapText#setLetterSpacing
182+ * @since 3.4.0
183+ *
184+ * @param {number } [spacing=0] - The amount of horizontal space to add between each character.
185+ *
186+ * @return {Phaser.GameObjects.BitmapText } This Game Object.
187+ */
188+ setLetterSpacing : function ( spacing )
189+ {
190+ if ( spacing === undefined ) { spacing = 0 ; }
191+
192+ this . letterSpacing = spacing ;
193+
194+ return this ;
195+ } ,
196+
176197 /**
177198 * [description]
178199 *
@@ -278,7 +299,8 @@ var BitmapText = new Class({
278299 var data = {
279300 font : this . font ,
280301 text : this . text ,
281- fontSize : this . fontSize
302+ fontSize : this . fontSize ,
303+ letterSpacing : this . letterSpacing
282304 } ;
283305
284306 out . data = data ;
You can’t perform that action at this time.
0 commit comments