From 5388aa0e0a85478ab58c23918137694adbdd948b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 20 Feb 2021 11:35:14 -0500 Subject: [PATCH] Fix --- commands/edit-image/font.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/edit-image/font.js b/commands/edit-image/font.js index 9d6000aa..0bc78d01 100644 --- a/commands/edit-image/font.js +++ b/commands/edit-image/font.js @@ -40,7 +40,7 @@ module.exports = class FontCommand extends Command { ctxPre.font = this.client.fonts.get(font.filename).toCanvasString(75); const len = ctxPre.measureText(text); const lines = await wrapText(ctxPre, text, 450); - const canvas = createCanvas(Math.min(len, 500), 50 + (75 * lines.length)); + const canvas = createCanvas(Math.min(len + 50, 500), 50 + (75 * lines.length)); const ctx = canvas.getContext('2d'); ctx.font = this.client.fonts.get(font.filename).toCanvasString(75); ctx.textBaseline = 'middle';