Skip to content

Commit

Permalink
Self host fonts (#1472)
Browse files Browse the repository at this point in the history
* Add three selfhosted fonts

* Run lint

* Add light and semibold as well
  • Loading branch information
Alex-Tideman authored Jul 10, 2023
1 parent 37e0c70 commit 52f70cc
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 5 deletions.
48 changes: 45 additions & 3 deletions src/app.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,52 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

@layer base {
@font-face {
font-family: 'Inter';
src: local('Inter'), local('inter'),
url('/src/lib/vendor/css/fonts/Inter/Inter-VariableFont_slnt\,wght.ttf');
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Light.ttf');
font-style: normal;
font-weight: 300;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Regular.ttf');
font-style: normal;
font-weight: 400;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Medium.ttf');
font-style: medium;
font-weight: 500;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-SemiBold.ttf');
font-style: medium;
font-weight: 600;
font-display: swap;
}
}

*,
html,
body {
Expand Down
47 changes: 45 additions & 2 deletions src/histoire.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,51 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('/src/lib/vendor/css/normalize.css');
@import url('/src/lib/vendor/prism/prism.css');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
@font-face {
font-family: 'Inter';
src: local('Inter'), local('inter'),
url('/src/lib/vendor/css/fonts/Inter/Inter-VariableFont_slnt\,wght.ttf');
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Light.ttf');
font-style: normal;
font-weight: 300;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Regular.ttf');
font-style: normal;
font-weight: 400;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-Medium.ttf');
font-style: medium;
font-weight: 500;
font-display: swap;
}

@font-face {
font-family: 'Poppins';
src: local('Poppins'), local('poppins'),
url('/src/lib/vendor/css/fonts/Poppins/Poppins-SemiBold.ttf');
font-style: medium;
font-weight: 600;
font-display: swap;
}
}
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Black.ttf
Binary file not shown.
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Light.ttf
Binary file not shown.
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Medium.ttf
Binary file not shown.
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added src/lib/vendor/css/fonts/Inter/Inter-Thin.ttf
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.
Binary file not shown.
Binary file not shown.

0 comments on commit 52f70cc

Please sign in to comment.