This commit is contained in:
Dragon Fire
2021-02-20 11:49:26 -05:00
parent 9038b61556
commit 713023f24b
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class FontCommand extends Command {
ctxPre.font = this.client.fonts.get(font.filename).toCanvasString(50);
const len = ctxPre.measureText(text);
const lines = await wrapText(ctxPre, text, 950);
const canvas = createCanvas(Math.min(len.width + 50, 1000), 50 + (50 * lines.length) + (10 * lines.length));
const canvas = createCanvas(Math.min(len.width + 50, 1000), 50 + (50 * lines.length) + (15 * lines.length));
const ctx = canvas.getContext('2d');
ctx.font = this.client.fonts.get(font.filename).toCanvasString(50);
ctx.textBaseline = 'top';