From b5291bf8f6e7dfca6b0d4e046575dea5d549adf9 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 18 Apr 2021 22:24:21 -0400 Subject: [PATCH] Fix --- commands/edit-meme/raw.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/commands/edit-meme/raw.js b/commands/edit-meme/raw.js index 3abc5f1c..ccaff05e 100644 --- a/commands/edit-meme/raw.js +++ b/commands/edit-meme/raw.js @@ -43,13 +43,8 @@ module.exports = class RawCommand extends Command { ctx.drawImage(base, 0, 0); ctx.textAlign = 'center'; ctx.textBaseline = 'top'; - ctx.font = this.client.fonts.get('wildwordsroman.ttf').toCanvasString(24); - let fontSize = 24; - while (ctx.measureText(text).width > 168) { - fontSize--; - ctx.font = this.client.fonts.get('wildwordsroman.ttf').toCanvasString(fontSize); - } - ctx.fillText(text, 520, 142); + ctx.font = this.client.fonts.get('wildwordsroman.ttf').toCanvasString(23); + ctx.fillText(text, 520, 145, 165); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'raw.png' }] }); } };