Skip to content

Commit

Permalink
Move font-face defs into HTML for CDN (#5612)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Oct 4, 2024
1 parent 1cedd4a commit 3fb14d1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
14 changes: 14 additions & 0 deletions bskyweb/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
*
* THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
*/
@font-face {
font-family: 'InterVariable';
src: url(/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf) format('truetype');
font-weight: 300 1000;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'InterVariableItalic';
src: url(/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf) format('truetype');
font-weight: 300 1000;
font-style: italic;
font-display: swap;
}
html {
background-color: white;
scrollbar-gutter: stable both-edges;
Expand Down
2 changes: 2 additions & 0 deletions src/alf/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export function applyFonts(
* IMPORTANT: This is unused. Expo statically extracts these fonts.
*
* All used fonts MUST be configured here. Unused fonts can be commented out.
*
* This is used for both web fonts and native fonts.
*/
export function DO_NOT_USE() {
return useFonts({
Expand Down
15 changes: 0 additions & 15 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
* may need to touch all three. Ask Eric if you aren't sure.
*/

@font-face {
font-family: 'InterVariable';
src: url(/assets/fonts/inter/InterVariable.ttf) format('truetype');
font-weight: 300 1000;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'InterVariableItalic';
src: url(/assets/fonts/inter/InterVariable-Italic.ttf) format('truetype');
font-weight: 300 1000;
font-style: italic;
font-display: swap;
}

/**
* BEGIN STYLES
*
Expand Down
14 changes: 14 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@
*
* THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
*/
@font-face {
font-family: 'InterVariable';
src: url(/static/media/InterVariable.c9f788f6e7ebaec75d7c.ttf) format('truetype');
font-weight: 300 1000;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'InterVariableItalic';
src: url(/static/media/InterVariable-Italic.55d6a3f35e9b605ba6f4.ttf) format('truetype');
font-weight: 300 1000;
font-style: italic;
font-display: swap;
}
html {
background-color: white;
scrollbar-gutter: stable both-edges;
Expand Down

0 comments on commit 3fb14d1

Please sign in to comment.