This commit is contained in:
Daniel Odendahl Jr
2019-02-08 16:36:57 +00:00
parent 32152dc3e0
commit 6c91e17046
+1
View File
@@ -59,6 +59,7 @@ module.exports = class MemeGenCommand extends Command {
ctx.fillText(topLines[i], base.width / 2, textHeight);
}
const bottomLines = await wrapText(ctx, bottom, base.width - 10);
ctx.textBaseline = 'bottom';
for (let i = 0; i < bottomLines.length; i++) {
const textHeight = base.height - (i * fontSize) - (i * 10);
ctx.fillText(bottomLines[i], base.width / 2, textHeight);