Canvas fillText
I want if the line exceeds the canvas width it'll minimuze the text until the specfic size then it'll go to second line
npm list discord.js and node node -v version?✅ Marked as resolved by OPconst applyText = (canvas, text) => {
const context = canvas.getContext('2d');
let fontSize = 100;
do {
context.font = `${fontSize -= 1}px sans-serif`;
} while (context.measureText(text).width > canvas.width - 140);
return context.font;
};