freenslens: increased height of single-line logos
All checks were successful
/ publish (push) Successful in 1m43s
All checks were successful
/ publish (push) Successful in 1m43s
This commit is contained in:
parent
3953adedd3
commit
09fceca2f9
|
|
@ -43,6 +43,7 @@
|
||||||
const availableWidth = width - PADDING * 2;
|
const availableWidth = width - PADDING * 2;
|
||||||
const availableHeight = height - PADDING * 2;
|
const availableHeight = height - PADDING * 2;
|
||||||
const halfHeight = availableHeight / 2;
|
const halfHeight = availableHeight / 2;
|
||||||
|
const threeQuartersHeight = availableHeight * 3 / 4;
|
||||||
|
|
||||||
ctx.fillStyle = 'white';
|
ctx.fillStyle = 'white';
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
|
|
@ -57,7 +58,7 @@
|
||||||
ctx.font = `bold ${fontSize}px sans-serif`;
|
ctx.font = `bold ${fontSize}px sans-serif`;
|
||||||
ctx.fillText(lower, width / 2, height - PADDING - halfHeight / 2 + 4);
|
ctx.fillText(lower, width / 2, height - PADDING - halfHeight / 2 + 4);
|
||||||
} else {
|
} else {
|
||||||
let fontSize = fitText(upper, availableWidth, halfHeight);
|
let fontSize = fitText(upper, availableWidth, threeQuartersHeight);
|
||||||
ctx.font = `bold ${fontSize}px sans-serif`;
|
ctx.font = `bold ${fontSize}px sans-serif`;
|
||||||
ctx.fillText(upper, width / 2, height / 2);
|
ctx.fillText(upper, width / 2, height / 2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue