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

load optimized Inter fonts (closes #709) #710

Merged
merged 8 commits into from
Oct 17, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ node_modules
static/fonts/*
!static/fonts/.gitkeep
!static/fonts/redaction
!static/fonts/inter*
static/twemoji/*
!static/twemoji/.gitkeep
/coverage
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<meta charset="utf-8" />
<link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="preload" href="/fonts/Inter-Regular.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="/fonts/Inter-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/redaction/Redaction_50-Italic.woff2" as="font" type="font/woff2" crossorigin>
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
Expand Down
1 change: 1 addition & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import 'radicle-design-system/static/colors.css';
import 'radicle-design-system/static/elevation.css';
import 'radicle-design-system/static/typography.css';
import '../styles/fonts.css'; /* must be after radicle-design-system/.../typography.css !! */
import '../styles/app.css';

import '$lib/stores/theme/theme.store';
Expand Down
16 changes: 16 additions & 0 deletions src/styles/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* cloned from radicle-design-system so we can swap in optimized fonts */

@font-face {
font-family: 'Inter Bold';
src: url('/fonts/Inter-Bold.woff2');
}

@font-face {
font-family: 'Inter SemiBold';
src: url('/fonts/Inter-Semibold.woff2');
}

@font-face {
font-family: 'Inter Regular';
src: url('/fonts/Inter-Regular.woff2');
}
Binary file added static/fonts/Inter-Bold.woff2
Binary file not shown.
Binary file added static/fonts/Inter-Regular.woff2
Binary file not shown.
Binary file added static/fonts/Inter-SemiBold.woff2
Binary file not shown.
Loading