Skip to content

Commit

Permalink
fonts: fix local imports, ship Inter typeface
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed Dec 17, 2023
1 parent 8fc7831 commit fa39ccb
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 4 deletions.
11 changes: 7 additions & 4 deletions custom/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* Import Fira Code font */
@import "/pandocs/fonts/fira_code.css";
/* Import Inter font */
@import url("https://rsms.me/inter/inter.css");
/*
Import Fira Code and Inter main stylesheets
This is broken when locally deploying with "mdbook serve"
because site-url is not used. Remove "/pandocs" to make it work
*/
@import "../fonts/fira_code.css";
@import "../fonts/inter.css";

html {
font-family: "Inter", sans-serif;
Expand Down
Binary file added src/fonts/Inter-Black.woff2
Binary file not shown.
Binary file added src/fonts/Inter-BlackItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Bold.woff2
Binary file not shown.
Binary file added src/fonts/Inter-BoldItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-ExtraBold.woff2
Binary file not shown.
Binary file added src/fonts/Inter-ExtraBoldItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-ExtraLight.woff2
Binary file not shown.
Binary file added src/fonts/Inter-ExtraLightItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Italic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Light.woff2
Binary file not shown.
Binary file added src/fonts/Inter-LightItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Medium.woff2
Binary file not shown.
Binary file added src/fonts/Inter-MediumItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Regular.woff2
Binary file not shown.
Binary file added src/fonts/Inter-SemiBold.woff2
Binary file not shown.
Binary file added src/fonts/Inter-SemiBoldItalic.woff2
Binary file not shown.
Binary file added src/fonts/Inter-Thin.woff2
Binary file not shown.
Binary file added src/fonts/Inter-ThinItalic.woff2
Binary file not shown.
Binary file added src/fonts/InterVariable-Italic.woff2
Binary file not shown.
Binary file added src/fonts/InterVariable.woff2
Binary file not shown.
39 changes: 39 additions & 0 deletions src/fonts/inter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* Variable fonts usage:
:root { font-family: "Inter", sans-serif; }
@supports (font-variation-settings: normal) {
:root { font-family: "InterVariable", sans-serif; font-optical-sizing: auto; }
} */
@font-face {
font-family: InterVariable;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("InterVariable.woff2") format("woff2");
}
@font-face {
font-family: InterVariable;
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("InterVariable-Italic.woff2") format("woff2");
}

/* static fonts */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100; font-display: swap; src: url("Inter-Thin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100; font-display: swap; src: url("Inter-ThinItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 200; font-display: swap; src: url("Inter-ExtraLight.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 200; font-display: swap; src: url("Inter-ExtraLightItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap; src: url("Inter-Light.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 300; font-display: swap; src: url("Inter-LightItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("Inter-Italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 500; font-display: swap; src: url("Inter-MediumItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 600; font-display: swap; src: url("Inter-SemiBoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("Inter-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("Inter-BoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("Inter-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 800; font-display: swap; src: url("Inter-ExtraBoldItalic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("Inter-Black.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 900; font-display: swap; src: url("Inter-BlackItalic.woff2") format("woff2"); }

0 comments on commit fa39ccb

Please sign in to comment.