Skip to content

Commit

Permalink
Optimize pretendard font loading (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
winterjung authored Jan 4, 2025
1 parent 03c9ae9 commit 4199903
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import "./static/fonts/pretendardvariable.css"
import "./static/theme/github-light.css"
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions src/components/seo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ export default function Seo({ title, description, image }) {
<meta name="twitter:description" content={meta.description} />
<meta name="twitter:image" content={meta.image} />
<meta name="twitter:creator" content={twitterUsername} />

<link
rel="stylesheet"
as="style"
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
/>
</Helmet>
)
}
Expand Down
Binary file added static/fonts/PretendardVariable.woff2
Binary file not shown.
16 changes: 16 additions & 0 deletions static/fonts/pretendardvariable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
Copyright (c) 2021 Kil Hyung-jin, with Reserved Font Name Pretendard.
https://github.com/orioncactus/pretendard
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
*/

@font-face {
font-family: 'Pretendard Variable';
font-weight: 45 920;
font-style: normal;
font-display: swap;
src: url('./PretendardVariable.woff2') format('woff2-variations');
}

0 comments on commit 4199903

Please sign in to comment.