This commit is contained in:
Dragon Fire
2020-07-04 23:51:20 -04:00
parent b5e4676cf8
commit 72c34d6384
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ module.exports = class CautionCommand extends Command {
ctx.textBaseline = 'top';
ctx.font = 'normal bold 60px Noto';
let fontSize = 60;
while (ctx.measureText(text).width > 3580) {
while (ctx.measureText(text).width > 3311) {
fontSize--;
ctx.font = `normal bold ${fontSize}px Noto`;
}
+1 -1
View File
@@ -55,7 +55,7 @@ module.exports = class DangerCommand extends Command {
fontSize--;
ctx.font = `normal bold ${fontSize}px Noto`;
}
const lines = await wrapText(ctx, text.toUpperCase(), 320);
const lines = await wrapText(ctx, text.toUpperCase(), 840);
const topMost = 510 - (((fontSize * lines.length) / 2) + ((20 * (lines.length - 1)) / 2));
for (let i = 0; i < lines.length; i++) {
const height = topMost + ((fontSize + 20) * i);