diff --git a/commands/edit-image/font.js b/commands/edit-image/font.js index 37a214e3..5bdd5230 100644 --- a/commands/edit-image/font.js +++ b/commands/edit-image/font.js @@ -40,8 +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); - console.log(lines); - const canvas = createCanvas(Math.min(len + 50, 500), 50 + (75 * lines.length)); + const canvas = createCanvas(Math.min(len.width + 50, 500), 50 + (75 * lines.length)); const ctx = canvas.getContext('2d'); ctx.font = this.client.fonts.get(font.filename).toCanvasString(75); ctx.textBaseline = 'middle';