Skip to content
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

refactor(google fonts): self host google fonts (DEV-471) #654

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
64 changes: 64 additions & 0 deletions src/assets/style/_font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* roboto-300 - latin */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 300;
font-display: swap;
src: local("Roboto Light"), local("Roboto-Light"), url(../fonts/roboto/roboto-v29-latin-300.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* roboto-italic - latin */
@font-face {
font-family: "Roboto";
font-style: italic;
font-weight: 400;
font-display: swap;
src: local("Roboto Italic"), local("Roboto-Italic"), url(../fonts/roboto/roboto-v29-latin-italic.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* roboto-regular - latin */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 400;
font-display: swap;
src: local("Roboto"), local("Roboto-Regular"), url(../fonts/roboto/roboto-v29-latin-regular.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* roboto-500 - latin */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 500;
font-display: swap;
src: local("Roboto Medium"), local("Roboto-Medium"), url(../fonts/roboto/roboto-v29-latin-500.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* roboto-700 - latin */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 700;
font-display: swap;
src: local("Roboto Bold"), local("Roboto-Bold"), url(../fonts/roboto/roboto-v29-latin-700.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* material-icons */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(../fonts/material-icons/MaterialIcons-Regular.eot);
/* For IE6-8 */
src: local("Material Icons"),
local("MaterialIcons-Regular"),
url(../fonts/material-icons/MaterialIcons-Regular.woff2) format("woff2"),
url(../fonts/material-icons/MaterialIcons-Regular.woff) format("woff"),
url(../fonts/material-icons/MaterialIcons-Regular.ttf) format("truetype");
}
27 changes: 27 additions & 0 deletions src/assets/style/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "./font";
@import "./theme";
@import "./layout";
@import "./elements";
Expand All @@ -10,6 +11,32 @@ body {
margin: 0;
}

// material icons
.material-icons {
font-family: "Material Icons";
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;

/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;

/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;

/* Support for IE. */
font-feature-settings: "liga";
}

// The following styles will override material design!

// jdnconvertiblecalendar main style
Expand Down
6 changes: 0 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./favicon.ico">

<!-- https://material.io/resources/icons/?style=baseline -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons"
rel="stylesheet">

<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">

<!-- Fathom - beautiful, simple website analytics -->
<script
src="https://cdn.usefathom.com/script.js"
Expand Down