fix: text-shadow position with baseline (#2576)

This commit is contained in:
Niklas von Hertzen 2021-07-13 19:14:27 +08:00 committed by GitHub
parent e29af58661
commit 439e365ea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,7 @@ export class CanvasRenderer {
this.ctx.shadowOffsetY = textShadow.offsetY.number * this.options.scale; this.ctx.shadowOffsetY = textShadow.offsetY.number * this.options.scale;
this.ctx.shadowBlur = textShadow.blur.number; this.ctx.shadowBlur = textShadow.blur.number;
this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height); this.renderTextWithLetterSpacing(text, styles.letterSpacing, baseline);
}); });
this.ctx.shadowColor = ''; this.ctx.shadowColor = '';