Skip to content

Commit

Permalink
fix: text-shadow position with baseline (#2576)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh authored Jul 13, 2021
1 parent e29af58 commit 439e365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/canvas/canvas-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit 439e365

Please sign in to comment.