Skip to content

Commit

Permalink
chore: local serving of Jost fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
EATSTEAK committed Jun 9, 2024
1 parent 52af56a commit 029a6ac
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
Binary file added public/fonts/Jost-Italic-Latin.woff2
Binary file not shown.
Binary file added public/fonts/Jost-Latin.woff2
Binary file not shown.
29 changes: 9 additions & 20 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,9 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<meta name="generator" content={Astro.generator} />

<!-- Font preloads -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap"
as="style"
onload="this.onload=null; this.rel='stylesheet';"
/>
<noscript>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap"
/>
</noscript>

<!-- GoatCounter -->
<script
data-goatcounter="https://eatsteak.goatcounter.com/count"
async
src="//gc.zgo.at/count.js"></script>
<link rel="preload" href="/fonts/MonoplexKR-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/Jost-Latin.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/Jost-Italic-Latin.woff2" as="font" type="font/woff2" crossorigin>

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />
Expand Down Expand Up @@ -83,3 +66,9 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
}
window.localStorage.setItem("theme", theme);
</script>

<!-- GoatCounter -->
<script
data-goatcounter="https://eatsteak.goatcounter.com/count"
async
src="//gc.zgo.at/count.js"></script>
20 changes: 20 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@
font-style: normal;
}

/* latin */
@font-face {
font-family: 'Jost';
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("/fonts/Jost-Italic-Latin.woff2") format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
font-family: 'Jost';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("/fonts/Jost-Latin.woff2") format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer base {
html {
@apply font-sans;
Expand Down

0 comments on commit 029a6ac

Please sign in to comment.