File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ Phaser.Text.prototype.updateText = function ()
443443 // Simple layout (no tabs)
444444 var lineWidth = this . style . strokeThickness + this . padding . x ;
445445
446- if ( this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 )
446+ if ( this . colors . length > 0 || this . strokeColors . length > 0 || this . fontWeights . length > 0 || this . fontStyles . length > 0 || this . letterSpacing !== '0px' )
447447 {
448448 lineWidth += this . measureLine ( lines [ i ] ) ;
449449 }
@@ -772,6 +772,11 @@ Phaser.Text.prototype.measureLine = function (line)
772772 this . updateShadow ( this . style . shadowFill ) ;
773773 }
774774
775+ if ( this . letterSpacing )
776+ {
777+ this . context . letterSpacing = this . letterSpacing ;
778+ }
779+
775780 lineLength += this . context . measureText ( letter ) . width ;
776781
777782 this . _charCount ++ ;
You can’t perform that action at this time.
0 commit comments