From d4049d8da0eda3c25c7193be1a1efcb0e45e45f0 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:10:27 -0400 Subject: [PATCH] Fix X and Y values of button text --- commands/edit-meme/two-buttons.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-meme/two-buttons.js b/commands/edit-meme/two-buttons.js index 7aba84cb..9589ac1b 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -63,7 +63,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.font = `${fontSize}px Noto`; } const firstLines = await wrapText(ctx, first, 183); - ctx.fillText(firstLines.join('\n'), 126, 70); + ctx.fillText(firstLines.join('\n'), 45, 178); ctx.font = '50px Noto'; fontSize = 50; while (ctx.measureText(second).width > 122) { @@ -71,7 +71,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.font = `${fontSize}px Noto`; } const secondLines = await wrapText(ctx, second, 122); - ctx.fillText(secondLines.join('\n'), 355, 79); + ctx.fillText(secondLines.join('\n'), 274, 187); ctx.rotate(12 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'two-buttons.png' }] }); }