diff --git a/src/core/text/Text.js b/src/core/text/Text.js index d48d0ae..2af93f9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -271,7 +271,7 @@ width += style.dropShadowDistance; } - this.canvas.width = ( width + this.context.lineWidth ) * this.resolution; + this.canvas.width = Math.ceil( ( width + this.context.lineWidth ) * this.resolution ); // calculate text height var lineHeight = this.style.lineHeight || fontProperties.fontSize + style.strokeThickness; @@ -282,7 +282,7 @@ height += style.dropShadowDistance; } - this.canvas.height = ( height + this._style.padding * 2 ) * this.resolution; + this.canvas.height = Math.ceil( ( height + this._style.padding * 2 ) * this.resolution ); this.context.scale( this.resolution, this.resolution);