This commit is contained in:
Dragon Fire
2024-05-03 10:49:28 -04:00
parent 7916e61bdc
commit a1cb26c596
3 changed files with 7 additions and 6 deletions
@@ -76,6 +76,7 @@ module.exports = class SpongebobTimeCardCommand extends Command {
fontSize -= 10;
ctx.font = this.client.fonts.get('Spongeboytt1.ttf').toCanvasString(fontSize);
metrics = ctx.measureText(lines.join('\n'));
heightMetric = measureTextHeightWithBreaks(ctx, lines.join('\n'));
lines = wrapText(ctx, text.toUpperCase(), 1800);
}
const topMost = (canvas.height / 2) - (((fontSize * lines.length) / 2) + ((60 * (lines.length - 1)) / 2));