fix: ACTUALLY fix font theming
This commit is contained in:
parent
64131e6f9c
commit
63dbfa2a0d
6 changed files with 7 additions and 6 deletions
|
@ -27,7 +27,8 @@ export default (name: string, seed: string): string => {
|
|||
ctx.fillStyle = 'white'
|
||||
ctx.textAlign = 'center'
|
||||
ctx.textBaseline = 'middle'
|
||||
const preferredFont = document.documentElement.style.getPropertyValue("--preferred-font")
|
||||
const root = document.documentElement;
|
||||
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
|
||||
ctx.fillText(previewName, 128, 136)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue