diff --git a/src/shapes/Text.ts b/src/shapes/Text.ts index 662fa5f2..ba8c2353 100644 --- a/src/shapes/Text.ts +++ b/src/shapes/Text.ts @@ -309,7 +309,8 @@ export class Text extends Shape { context.moveTo(lineTranslateX, translateY + lineTranslateY + yOffset); spacesNumber = text.split(' ').length - 1; oneWord = spacesNumber === 0; - lineWidth = align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width; + lineWidth = + align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width; context.lineTo( lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + yOffset