mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
Fix
This commit is contained in:
@@ -85,12 +85,11 @@ module.exports = class PhoebeTeachingJoeyCommand extends Command {
|
|||||||
let step = steps[i];
|
let step = steps[i];
|
||||||
if (step === incorrect && j === 0) step = correct.join(' ');
|
if (step === incorrect && j === 0) step = correct.join(' ');
|
||||||
let fontSize = 18;
|
let fontSize = 18;
|
||||||
while (ctx.measureText(step).width > 390) {
|
while (ctx.measureText(step).width > 260) {
|
||||||
fontSize -= 1;
|
fontSize -= 1;
|
||||||
ctx.font = `${fontSize}px Noto`;
|
ctx.font = `${fontSize}px Noto`;
|
||||||
}
|
}
|
||||||
const lines = await wrapText(ctx, step, 260);
|
ctx.fillText(step, x, y, 260);
|
||||||
ctx.fillText(lines.join('\n'), x, y);
|
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
Reference in New Issue
Block a user