mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Fix
This commit is contained in:
@@ -56,10 +56,10 @@ module.exports = class GruPlanCommand extends Command {
|
|||||||
ctx.textBaseline = 'top';
|
ctx.textBaseline = 'top';
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for (const [x, y] of coord) {
|
for (const [x, y] of coord) {
|
||||||
ctx.font = '50px Noto';
|
ctx.font = '40px Noto';
|
||||||
const step = steps[i];
|
const step = steps[i];
|
||||||
let fontSize = 50;
|
let fontSize = 40;
|
||||||
while (ctx.measureText(step).width > 1237) {
|
while (ctx.measureText(step).width > 1100) {
|
||||||
fontSize -= 1;
|
fontSize -= 1;
|
||||||
ctx.font = `${fontSize}px Noto`;
|
ctx.font = `${fontSize}px Noto`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user