font size settings

This commit is contained in:
loicbersier 2020-02-21 21:07:54 +01:00
parent 592516d8b0
commit 48c46b8a5c

View file

@ -25,6 +25,11 @@ class memeCommand extends Command {
},
type: 'string',
match: 'rest'
},
{
id: 'fontSize',
match: 'option',
flag: '--fontSize',
}
],
description: {
@ -79,7 +84,7 @@ class memeCommand extends Command {
// Set text position for top and bottom
const TOP_POS = Math.abs((value.height / 2) - PADDING) * -1;
const BOTTOM_POS = (value.height / 2) - PADDING;
const FONT_SIZE = (value.width / 10);
let FONT_SIZE = args.fontSize == true ? args.fontSize : (value.width / 10);
// Write text on image using graphicsmagick
img.font(FONT, FONT_SIZE)