Skip to content

Commit 8ad561a

Browse files
committed
adjust canvas height for better text rendering
1 parent 32029bc commit 8ad561a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handlers/canvasToBlob.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class canvasToBlobHandler implements FormatHandler {
9393

9494
this.#ctx.font = font;
9595
this.#canvas.width = this.#ctx.measureText(string).width;
96-
this.#canvas.height = fontSize;
96+
this.#canvas.height = Math.floor(fontSize * 1.5);
9797

9898
if (outputFormat.mime === "image/jpeg") {
9999
this.#ctx.fillStyle = "white";

0 commit comments

Comments
 (0)