mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -69,7 +69,7 @@ module.exports = class TweetCommand extends Command {
|
||||
const canvas = createCanvas(base1.width, base1.height + base2.height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.font = this.client.fonts.get('ChirpRegular.ttf').toCanvasString(23);
|
||||
const lines = wrapText(ctx, text, 710);
|
||||
const lines = wrapText(ctx, text, 710, true);
|
||||
const metrics = ctx.measureText(lines.join('\n'));
|
||||
const linesLen = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 15;
|
||||
canvas.height += linesLen;
|
||||
|
||||
Reference in New Issue
Block a user