mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Fix
This commit is contained in:
@@ -63,8 +63,11 @@ module.exports = class MemeGenModernCommand extends Command {
|
|||||||
ctx.font = '40px Noto';
|
ctx.font = '40px Noto';
|
||||||
const lines = await wrapText(ctx, text, base.width - 10);
|
const lines = await wrapText(ctx, text, base.width - 10);
|
||||||
const lineBreakLen = text.split('\n').length;
|
const lineBreakLen = text.split('\n').length;
|
||||||
const linesLen = (40 * lines.length) + (40 * (lineBreakLen - 1)) + (14 * lines.length) + (14 * (lineBreakLen - 1));
|
const linesLen = (40 * lines.length)
|
||||||
canvas.height += linesLen + 5;
|
+ (40 * (lineBreakLen - 1))
|
||||||
|
+ (14 * lines.length)
|
||||||
|
+ (14 * (lineBreakLen - 1));
|
||||||
|
canvas.height += linesLen + 14;
|
||||||
ctx.font = '40px Noto';
|
ctx.font = '40px Noto';
|
||||||
ctx.textBaseline = 'top';
|
ctx.textBaseline = 'top';
|
||||||
ctx.fillStyle = 'white';
|
ctx.fillStyle = 'white';
|
||||||
|
|||||||
Reference in New Issue
Block a user