From 1fd5c25900209f0808decb8a23d526c7c4071675 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:06:22 -0400 Subject: [PATCH] Fix Lint --- commands/edit-meme/two-buttons.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/edit-meme/two-buttons.js b/commands/edit-meme/two-buttons.js index 508bb5c6..dccc88d0 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -57,6 +57,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.drawImage(base, 0, 0); ctx.rotate(12 * (Math.PI / 180)); ctx.font = '50px Noto'; + let fontSize = 50; while (ctx.measureText(first).width > 183) { fontSize -= 1; ctx.font = `${fontSize}px Noto`; @@ -64,6 +65,7 @@ module.exports = class TwoButtonsCommand extends Command { const firstLines = await wrapText(ctx, first, 183); ctx.fillText(firstLines.join('\n'), 126, 70); ctx.font = '50px Noto'; + fontSize = 50; while (ctx.measureText(second).width > 122) { fontSize -= 1; ctx.font = `${fontSize}px Noto`;