From 37122dc44ae2b823aa8abd7703a169aa4ebb9ac7 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:19:06 -0400 Subject: [PATCH] Fix buttons width --- 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 70532e18..a9765915 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -64,7 +64,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.font = `${fontSize}px Noto`; } const firstLines = await wrapText(ctx, first, 183); - ctx.fillText(firstLines.join('\n'), 45, 111); + ctx.fillText(firstLines.join('\n'), 20, 111); ctx.font = '34px Noto'; fontSize = 34; while (ctx.measureText(second).width > 163) { @@ -72,7 +72,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.font = `${fontSize}px Noto`; } const secondLines = await wrapText(ctx, second, 122); - ctx.fillText(secondLines.join('\n'), 274, 120); + ctx.fillText(secondLines.join('\n'), 249, 120); ctx.rotate(12 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'two-buttons.png' }] }); }