-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Replace Google Font with local variable font #1910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
18cf43f
d0b1886
aab6301
860e96e
fcd87bf
5e1a6ed
53b65da
5540a44
7e66ce9
b543dd9
3c16d21
44d7d33
0167c97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import url("../fonts/open-sans/fonts.css"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be imported from the head using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You’re right. I was initially planning to use the {page.lang}.css file to import fonts, similar to how it's done for the Korean font. However, since the font is shared across multiple languages, it doesn’t make sense to repeat the same I suggest defining Edit:- It is better to write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’d prefer to keep the font imports separate, that file is too large. The location of the file is fine in my opinion, but it should be in the HEAD. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ok, then the only option is to use one more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ShubhamOulkar @bjohansebas I've added this in HTML file
We can preload |
||
|
||
* { | ||
box-sizing: border-box; | ||
-webkit-tap-highlight-color: transparent; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@font-face { | ||
font-family: "Open Sans"; | ||
ShubhamOulkar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
font-style: normal; | ||
font-weight: 100 700; | ||
font-display: swap; | ||
src: local("Open Sans"), | ||
url("./woff2/OpenSans.woff2") format("woff2"), | ||
ShubhamOulkar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
url("./woff/OpenSans.woff") format("woff"), | ||
} | ||
|
||
@font-face { | ||
font-family: "Open Sans"; | ||
font-style: italic; | ||
font-weight: 100 700; | ||
font-display: swap; | ||
src: local("Open Sans"), | ||
url("./woff2/OpenSans-Italic.woff2") format("woff2"), | ||
url("./woff/OpenSans-Italic.woff") format("woff"), | ||
} |
Uh oh!
There was an error while loading. Please reload this page.