This commit is contained in:
Daniel Odendahl Jr
2019-02-08 16:41:47 +00:00
parent 3fe4545a50
commit 017b751b86
+1 -1
View File
@@ -60,7 +60,7 @@ module.exports = class MemeGenCommand extends Command {
}
const bottomLines = await wrapText(ctx, bottom, base.width - 10);
ctx.textBaseline = 'bottom';
const initial = base.height - ((bottomLines.length - 1) * fontSize) + ((bottomLines.length - 1) * 10);
const initial = base.height - ((bottomLines.length - 1) * fontSize) - ((bottomLines.length - 1) * 10);
for (let i = 0; i < bottomLines.length; i++) {
const textHeight = initial + (i * fontSize) + (i * 10);
ctx.fillText(bottomLines[i], base.width / 2, textHeight);