From f36521e80531c2b1bf5e11f448f0f5b2fe051562 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 3 May 2024 00:49:51 -0400 Subject: [PATCH] Fix --- commands/edit-image-text/font.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/edit-image-text/font.js b/commands/edit-image-text/font.js index 42251587..30a9667d 100644 --- a/commands/edit-image-text/font.js +++ b/commands/edit-image-text/font.js @@ -38,7 +38,7 @@ module.exports = class FontCommand extends Command { ctxPre.font = this.client.fonts.get(font.filename).toCanvasString(50); const len = ctxPre.measureText(text); const lines = wrapText(ctxPre, text, 950); - const height = len.actualBoundingBoxAscent + len.actualBoundingBoxDescent; + const height = len.emHeightAscent + len.emHeightDescent; const canvas = createCanvas(Math.min(len.width + 50, 1000), 50 + height); const ctx = canvas.getContext('2d'); ctx.font = this.client.fonts.get(font.filename).toCanvasString(50);