diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index b5a6e30..fdd61da 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -23,6 +23,7 @@ * @param [style.dropShadowColor='#000000'] {String} A fill style to be used on the dropshadow e.g 'red', '#00FF00' * @param [style.dropShadowAngle=Math.PI/4] {Number} Set a angle of the drop shadow * @param [style.dropShadowDistance=5] {Number} Set a distance of the drop shadow + * @param [style.lineJoin='miter'] {String} The lineJoin property sets the type of corner created, it can resolve spiked text issue. Default is 'miter' (creates a sharp corner). */ PIXI.Text = function(text, style) { @@ -123,6 +124,7 @@ * @param [style.dropShadowColor='#000000'] {String} A fill style to be used on the dropshadow e.g 'red', '#00FF00' * @param [style.dropShadowAngle=Math.PI/4] {Number} Set a angle of the drop shadow * @param [style.dropShadowDistance=5] {Number} Set a distance of the drop shadow + * @param [style.lineJoin='miter'] {String} The lineJoin property sets the type of corner created, it can resolve spiked text issue. Default is 'miter' (creates a sharp corner). */ PIXI.Text.prototype.setStyle = function(style) { @@ -139,6 +141,7 @@ style.dropShadowAngle = style.dropShadowAngle || Math.PI / 6; style.dropShadowDistance = style.dropShadowDistance || 4; style.dropShadowColor = style.dropShadowColor || 'black'; + style.lineJoin = style.lineJoin || 'miter'; this.style = style; this.dirty = true; @@ -213,7 +216,7 @@ this.context.strokeStyle = this.style.stroke; this.context.lineWidth = this.style.strokeThickness; this.context.textBaseline = 'alphabetic'; - //this.context.lineJoin = 'round'; + this.context.lineJoin = this.style.lineJoin; var linePositionX; var linePositionY;