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

This commit is contained in:
MoyuScript 2021-07-13 19:14:27 +08:00
parent 6e01b03f77
commit b6e6ccaa4f

View File

@ -198,7 +198,7 @@ export class CanvasRenderer {
this.ctx.shadowOffsetY = textShadow.offsetY.number * this.options.scale;
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 = '';