mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Test
This commit is contained in:
@@ -40,6 +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);
|
||||
console.log(lines);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user