Fix signature on server-side generation

parent f13d17ec
Pipeline #1563 passed with stage
in 42 seconds
......@@ -143,12 +143,12 @@ app.get('/generate.png', function (req, res) {
ctx.font = '12pt FiraSans';
ctx.fillStyle = '#497ed5';
let offset = height * 0.05;
if (req.args.signature) {
if (req.args.signature.trim()) {
ctx.fillText(_('Faites comme '), offset, height * 0.9);
offset += ctx.measureText(_('Faites comme ')).width;
ctx.font = 'bold 12pt FiraSans';
ctx.fillText(req.args.signature, offset, height * 0.9);
offset += ctx.measureText(req.args.signature).width;
ctx.fillText(req.args.signature.trim(), offset, height * 0.9);
offset += ctx.measureText(req.args.signature.trim()).width;
ctx.font = '12pt FiraSans';
ctx.fillText(', s', offset, height * 0.9);
offset += ctx.measureText(', s').width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment