This commit is contained in:
Dragon Fire
2019-08-05 16:21:49 -04:00
parent 2369556acd
commit c7adb9e4cc
+2 -2
View File
@@ -69,11 +69,11 @@ module.exports = class PlanktonPlanCommand extends Command {
ctx.font = '35px Noto'; ctx.font = '35px Noto';
const step = steps[i]; const step = steps[i];
let fontSize = 35; let fontSize = 35;
while (ctx.measureText(step).width > 520) { while (ctx.measureText(step).width > 420) {
fontSize -= 1; fontSize -= 1;
ctx.font = `${fontSize}px Noto`; ctx.font = `${fontSize}px Noto`;
} }
const lines = await wrapText(ctx, step, 160); const lines = await wrapText(ctx, step, 155);
ctx.fillText(lines.join('\n'), x, y); ctx.fillText(lines.join('\n'), x, y);
i++; i++;
} }