astro-font
astro-font copied to clipboard
Invalid Property Value with Google Fonts
I'm trying to load a Google Fonts font with Astro Font:
<head>
<!-- snip -->
<AstroFont
config={[
{
src: [],
name: 'Press Start 2P',
googleFontsURL: 'https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap',
preload: true,
display: 'swap',
selector: 'body',
fallback: 'sans-serif',
},
]}
/>
</head>
This appears to produce the following CSS, which Firefox flags as an "Invalid Property Value". The font does not render correctly.
body {
font-family: Press Start 2P, '_font_fallback_1107014354668', sans-serif;
}
Adding single quotes around Press Start 2P
in the CSS seems to fix the "Invalid Property Value" warning, but doesn't fix the rendering.