From fc23466306f078c442d2acc0e396f28768aa84c3 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 May 2020 12:12:20 -0400 Subject: [PATCH] Fix text wrapping in button --- 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 9589ac1b..5dbe5616 100644 --- a/commands/edit-meme/two-buttons.js +++ b/commands/edit-meme/two-buttons.js @@ -58,7 +58,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.rotate(-12 * (Math.PI / 180)); ctx.font = '50px Noto'; let fontSize = 50; - while (ctx.measureText(first).width > 183) { + while (ctx.measureText(first).width > 244) { fontSize -= 1; ctx.font = `${fontSize}px Noto`; } @@ -66,7 +66,7 @@ module.exports = class TwoButtonsCommand extends Command { ctx.fillText(firstLines.join('\n'), 45, 178); ctx.font = '50px Noto'; fontSize = 50; - while (ctx.measureText(second).width > 122) { + while (ctx.measureText(second).width > 163) { fontSize -= 1; ctx.font = `${fontSize}px Noto`; }