From 439e365ea8c703b528778a268dcfc3bf9ccad6a9 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Tue, 13 Jul 2021 19:14:27 +0800 Subject: [PATCH] fix: text-shadow position with baseline (#2576) --- src/render/canvas/canvas-renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index 2c6a639..5cd9f32 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -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 = '';