fix: preferred font not working as intended for default icons
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
788222967b
commit
e87edbc967
1 changed files with 1 additions and 3 deletions
|
@ -27,9 +27,7 @@ export default (name: string, seed: string): string => {
|
||||||
ctx.fillStyle = 'white'
|
ctx.fillStyle = 'white'
|
||||||
ctx.textAlign = 'center'
|
ctx.textAlign = 'center'
|
||||||
ctx.textBaseline = 'middle'
|
ctx.textBaseline = 'middle'
|
||||||
const root = document.documentElement;
|
ctx.font = `bold 96px Arial, Helvetica, sans-serif`
|
||||||
const preferredFont = getComputedStyle(root).getPropertyValue("--preferred-font");
|
|
||||||
ctx.font = `bold 96px ${preferredFont}, Arial, Helvetica, sans-serif`
|
|
||||||
// 136 isn't actually centered, but it *looks* centered
|
// 136 isn't actually centered, but it *looks* centered
|
||||||
ctx.fillText(previewName, 128, 136)
|
ctx.fillText(previewName, 128, 136)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue