diff --git a/commands/edit-image-text/tweet.js b/commands/edit-image-text/tweet.js index 89b403e3..b2c6a29a 100644 --- a/commands/edit-image-text/tweet.js +++ b/commands/edit-image-text/tweet.js @@ -207,13 +207,13 @@ module.exports = class TweetCommand extends Command { const lineEmoji = line.match(emojiRegex()); const height = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent; if (!lineEmoji) { - ctx.fillText(line, x, y + height * currentLine); + ctx.fillText(line, x, y + (height * currentLine)); continue; } let currentX = x; for (let i = 0; i < lineNoEmoji.length; i++) { const linePart = lineNoEmoji[i]; - ctx.fillText(linePart, currentX, y + height * currentLine); + ctx.fillText(linePart, currentX, y + (height * currentLine)); currentX += ctx.measureText(linePart).width; const parsedEmoji = twemoji.parse(emoji[i]); if (!parsedEmoji.length || !parsedEmoji[0].url) continue; @@ -221,7 +221,7 @@ module.exports = class TweetCommand extends Command { const loadedEmoji = await loadImage(body); loadedEmoji.width = emojiSize; loadedEmoji.height = emojiSize; - ctx.drawImage(loadedEmoji, currentX, y + height, emojiSize, emojiSize); + ctx.drawImage(loadedEmoji, currentX, y + (height * currentLine), emojiSize, emojiSize); currentX += emojiSize; } }