Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link
rel="preload"
href="/fonts/open-sans/woff2/OpenSans.woff2"
href="/fonts/open-sans/woff2/open-sans-latin-wght-normal.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="/fonts/open-sans/woff2/OpenSans-Italic.woff2"
href="/fonts/open-sans/woff2/open-sans-latin-wght-italic.woff2"
as="font"
type="font/woff2"
crossorigin
Expand Down
Binary file removed fonts/FontAwesome.otf
Binary file not shown.
Binary file removed fonts/fontawesome-webfont.eot
Binary file not shown.
520 changes: 0 additions & 520 deletions fonts/fontawesome-webfont.svg

This file was deleted.

Binary file removed fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file removed fonts/fontawesome-webfont.woff
Binary file not shown.
14 changes: 8 additions & 6 deletions fonts/open-sans/fonts.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 100 700;
font-weight: 300 800;
font-display: swap;
src: local("Open Sans"),
url("./woff2/OpenSans.woff2") format("woff2"),
url("./woff/OpenSans.woff") format("woff"),
url("./woff2/open-sans-latin-wght-normal.woff2") format("woff2-variations"),
url("./woff/OpenSans.woff") format("woff");
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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 100 700;
font-weight: 300 800;
font-display: swap;
src: local("Open Sans"),
url("./woff2/OpenSans-Italic.woff2") format("woff2"),
url("./woff/OpenSans-Italic.woff") format("woff"),
url("./woff2/open-sans-latin-wght-italic.woff2") format("woff2-variations"),
url("./woff/OpenSans-Italic.woff") format("woff");
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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that? Why should we make a condition for that font to download?

Copy link
Member Author

@ShubhamOulkar ShubhamOulkar Aug 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for font optimization, if page don't use any of this character from this range then font will not download. This is effective when we are importing fonts from third party source like https://github.com/fontsource/font-files/tree/main/fonts/variable/open-sans/files. All fonts won't get download, only characters used by page, that fonts will get download. But in our case, we are self-hosting only two files that are used. So will not see any difference in optimization. But I decided to go with font source importing style.

}
Binary file removed fonts/open-sans/woff2/OpenSans-Italic.woff2
Binary file not shown.
Binary file removed fonts/open-sans/woff2/OpenSans.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const languageElement = document.getElementById('languageData');
const languagesData = languageElement ? JSON.parse(languageElement.dataset.languages) : [];
const langDisplay = document.getElementById('current-lang');
const i18nMsgBox = document.getElementById("i18n-notice-box");
const scrollToTopBtn = document.getElementById("top");

// display current language in language picker component
if (langDisplay) {
Expand Down