Skip to content

Commit

Permalink
🌞 frontend: Self-host webfonts (#232)
Browse files Browse the repository at this point in the history
Self-host the webfonts Fira Code and Inter used in Evy projects. We want to
 do this so that Evy can be run entirely without internet access.

 In a preparatory step move `index.css` to `css/index.css` - we will splitting
 index.css into a lot more files and it seems to be common practise in
 frontend dev to groups in directories similar to `css/`, `img/`, `js/` etc.

This merges the following commits:
* frontend: Move index.css to css/index.css
* frontend: Self-host webfonts

     frontend/css/fonts.css                        |  85 ++++++++++++++++++
     .../css/fonts/firacode-cyrillic-ext-v22.woff2 | Bin 0 -> 21788 bytes
     .../css/fonts/firacode-cyrillic-v22.woff2     | Bin 0 -> 11716 bytes
     .../css/fonts/firacode-greek-ext-v22.woff2    | Bin 0 -> 8168 bytes
     frontend/css/fonts/firacode-greek-v22.woff2   | Bin 0 -> 13524 bytes
     .../css/fonts/firacode-latin-ext-v22.woff2    | Bin 0 -> 12696 bytes
     frontend/css/fonts/firacode-latin-v22.woff2   | Bin 0 -> 35496 bytes
     .../css/fonts/inter-cyrillic-ext-v13.woff2    | Bin 0 -> 27316 bytes
     frontend/css/fonts/inter-cyrillic-v13.woff2   | Bin 0 -> 17612 bytes
     frontend/css/fonts/inter-greek-ext-v13.woff2  | Bin 0 -> 12768 bytes
     frontend/css/fonts/inter-greek-v13.woff2      | Bin 0 -> 22524 bytes
     frontend/css/fonts/inter-latin-ext-v13.woff2  | Bin 0 -> 80044 bytes
     frontend/css/fonts/inter-latin-v13.woff2      | Bin 0 -> 46552 bytes
     frontend/css/fonts/inter-vietnamese-v13.woff2 | Bin 0 -> 10496 bytes
     frontend/{ => css}/index.css                  |   0
     frontend/index.html                           |   9 +-
     16 files changed, 87 insertions(+), 7 deletions(-)

Pull-Request: #232
  • Loading branch information
juliaogris committed Jan 4, 2024
2 parents 6508dad + 395249c commit 8fe18be
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 7 deletions.
85 changes: 85 additions & 0 deletions frontend/css/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-cyrillic-ext-v22.woff2) format("woff2");
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-cyrillic-v22.woff2) format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-greek-ext-v22.woff2) format("woff2");
unicode-range: U+1F00-1FFF;
}
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-greek-v22.woff2) format("woff2");
unicode-range: U+0370-03FF;
}
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-latin-ext-v22.woff2) format("woff2");
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Fira Code";
font-display: swap;
src: url(fonts/firacode-latin-v22.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-cyrillic-ext-v13.woff2) format("woff2");
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-cyrillic-v13.woff2) format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-greek-ext-v13.woff2) format("woff2");
unicode-range: U+1F00-1FFF;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-greek-v13.woff2) format("woff2");
unicode-range: U+0370-03FF;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-vietnamese-v13.woff2) format("woff2");
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-latin-ext-v13.woff2) format("woff2");
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "Inter";
font-display: swap;
src: url(fonts/inter-latin-v13.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
}
Binary file not shown.
Binary file added frontend/css/fonts/firacode-cyrillic-v22.woff2
Binary file not shown.
Binary file added frontend/css/fonts/firacode-greek-ext-v22.woff2
Binary file not shown.
Binary file added frontend/css/fonts/firacode-greek-v22.woff2
Binary file not shown.
Binary file added frontend/css/fonts/firacode-latin-ext-v22.woff2
Binary file not shown.
Binary file added frontend/css/fonts/firacode-latin-v22.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-cyrillic-ext-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-cyrillic-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-greek-ext-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-greek-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-latin-ext-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-latin-v13.woff2
Binary file not shown.
Binary file added frontend/css/fonts/inter-vietnamese-v13.woff2
Binary file not shown.
File renamed without changes.
9 changes: 2 additions & 7 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
<title>evy | Playground</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="img/favicon.png" />
<link rel="stylesheet" href="index.css" type="text/css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@400;700&display=swap"
/>
<link rel="stylesheet" href="css/index.css" type="text/css" />
<link rel="stylesheet" href="css/fonts.css" type="text/css" />
<script src="wasm_exec.js" defer></script>
<script src="index.js" type="module" defer></script>
</head>
Expand Down

0 comments on commit 8fe18be

Please sign in to comment.