This commit is contained in:
Dragon Fire
2021-02-20 11:35:14 -05:00
parent de49bee516
commit 5388aa0e0a
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class FontCommand extends Command {
ctxPre.font = this.client.fonts.get(font.filename).toCanvasString(75);
const len = ctxPre.measureText(text);
const lines = await wrapText(ctxPre, text, 450);
const canvas = createCanvas(Math.min(len, 500), 50 + (75 * lines.length));
const canvas = createCanvas(Math.min(len + 50, 500), 50 + (75 * lines.length));
const ctx = canvas.getContext('2d');
ctx.font = this.client.fonts.get(font.filename).toCanvasString(75);
ctx.textBaseline = 'middle';