diff --git a/src/text/Text.js b/src/text/Text.js index 3f48d65..fa74a30 100644 --- a/src/text/Text.js +++ b/src/text/Text.js @@ -28,6 +28,8 @@ * @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.padding=0] {number} Occasionally some fonts are cropped. Adding some padding will prevent this from happening + * @param [style.lineJoin='miter'] {string} The lineJoin property sets the type of corner created, it can resolve + * spiked text issues. Default is 'miter' (creates a sharp corner). */ function Text(text, style, resolution) { @@ -149,6 +151,8 @@ * @param [style.dropShadowDistance=5] {number} Set a distance of the drop shadow * @param [style.padding=0] {number} Occasionally some fonts are cropped. Adding some padding will prevent this from happening * @memberof Text# + * @param [style.lineJoin='miter'] {string} The lineJoin property sets the type of corner created, it can resolve + * spiked text issues. Default is 'miter' (creates a sharp corner). */ style: { get: function () @@ -173,6 +177,8 @@ style.padding = style.padding || 0; + style.lineJoin = style.lineJoin || 'miter'; + this._style = style; this.dirty = true; } @@ -263,7 +269,7 @@ this.context.strokeStyle = style.stroke; this.context.lineWidth = style.strokeThickness; this.context.textBaseline = 'alphabetic'; - //this.context.lineJoin = 'round'; + this.context.lineJoin = style.lineJoin; var linePositionX; var linePositionY;