font size settings
This commit is contained in:
parent
592516d8b0
commit
48c46b8a5c
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue