This commit is contained in:
Dragon Fire
2024-04-26 18:22:53 -04:00
parent 5203c736dd
commit 8c306180e9
+1 -1
View File
@@ -250,7 +250,7 @@ module.exports = class TweetCommand extends Command {
if (i !== 0) preWords += ' ';
const emoji = preWords.match(emojiRegex());
let preLen = ctx.measureText(preWords.replace(emojiRegex(), '')).width;
preLen += emoji.length * emojiSize;
if (emoji) preLen += emoji.length * emojiSize;
const oldStyle = ctx.fillStyle;
ctx.fillStyle = '#1da1f2';
ctx.fillText(word, x + preLen, y + (height * currentLine));