mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Fix
This commit is contained in:
@@ -55,8 +55,8 @@ module.exports = class SonicSaysCommand extends Command {
|
|||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.textBaseline = 'top';
|
ctx.textBaseline = 'top';
|
||||||
ctx.drawImage(base, 0, 0);
|
ctx.drawImage(base, 0, 0);
|
||||||
ctx.font = '26px Noto';
|
ctx.font = '24px Noto';
|
||||||
let fontSize = 26;
|
let fontSize = 24;
|
||||||
while (ctx.measureText(text).width > 648) {
|
while (ctx.measureText(text).width > 648) {
|
||||||
fontSize--;
|
fontSize--;
|
||||||
ctx.font = `${fontSize}px Noto`;
|
ctx.font = `${fontSize}px Noto`;
|
||||||
|
|||||||
Reference in New Issue
Block a user