From 4056b9093000aa6d7465268e7d5297f6d1f1ea4d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:34:24 -0400 Subject: [PATCH] Fix --- commands/edit-meme/two-buttons.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/edit-meme/two-buttons.js b/commands/edit-meme/two-buttons.js index afc42f41..ffc05a61 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -66,10 +66,9 @@ module.exports = class TwoButtonsCommand extends Command { const firstLines = await wrapText(ctx, first, 183); let lineOffset = 0; for (let i = 0; i < firstLines.length; i++) { - ctx.fillText(firstLines[i], 25 + lineOffset, 116 + fontSize + (10 * i), 183); + ctx.fillText(firstLines[i], 25 + lineOffset, 116 + (fontSize * i) + (10 * i), 183); lineOffset += 5; } - ctx.fillText(firstLines.join('\n'), 25, 116); ctx.font = '34px Noto'; fontSize = 34; while (ctx.measureText(second).width > 244) { @@ -79,7 +78,7 @@ module.exports = class TwoButtonsCommand extends Command { const secondLines = await wrapText(ctx, second, 118); lineOffset = 0; for (let i = 0; i < secondLines.length; i++) { - ctx.fillText(secondLines[i], 254 + lineOffset, 130 + fontSize + (10 * i), 118); + ctx.fillText(secondLines[i], 254 + lineOffset, 130 + (fontSize * i) + (10 * i), 118); lineOffset += 5; } ctx.rotate(12 * (Math.PI / 180));