Browse Source

fix(fonts): move fonts to public folder so that its served as static assets via cra & works in export (#2264)

pull/2269/head
Aakansha Doshi 5 years ago committed by GitHub
parent
commit
1034ec91b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 0
      public/Cascadia.ttf
  2. 0
      public/Cascadia.woff2
  3. 0
      public/FG_Virgil.otf
  4. 0
      public/FG_Virgil.ttf
  5. 0
      public/FG_Virgil.woff2
  6. 13
      public/fonts.css
  7. 17
      public/index.html
  8. 14
      src/css/app.scss
  9. 1
      src/excalidraw-embed/webpack.prod.config.js

0
src/fonts/Cascadia.ttf → public/Cascadia.ttf

0
src/fonts/Cascadia.woff2 → public/Cascadia.woff2

0
src/fonts/FG_Virgil.otf → public/FG_Virgil.otf

0
src/fonts/FG_Virgil.ttf → public/FG_Virgil.ttf

0
src/fonts/FG_Virgil.woff2 → public/FG_Virgil.woff2

13
public/fonts.css

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
@font-face {
font-family: "Virgil";
src: url("FG_Virgil.woff2");
font-display: swap;
}
/* https://github.com/microsoft/cascadia-code */
@font-face {
font-family: "Cascadia";
src: url("Cascadia.woff2");
font-display: swap;
}

17
public/index.html

@ -81,6 +81,9 @@ @@ -81,6 +81,9 @@
href="manifest.json"
style="--pwacompat-splash-font: 24px Virgil"
/>
<link rel="stylesheet" href="fonts.css" type="text/css" />
<% if (process.env.REACT_APP_INCLUDE_GTAG === 'true') { %>
<script
async
@ -109,20 +112,6 @@ @@ -109,20 +112,6 @@
height: 100vh;
}
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
@font-face {
font-family: "Virgil";
src: url("../src/fonts/FG_Virgil.woff2");
font-display: swap;
}
/* https://github.com/microsoft/cascadia-code */
@font-face {
font-family: "Cascadia";
src: url("../src/fonts/Cascadia.woff2");
font-display: swap;
}
.visually-hidden {
position: absolute !important;
height: 1px;

14
src/css/app.scss

@ -1,17 +1,3 @@ @@ -1,17 +1,3 @@
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
@font-face {
font-family: "Virgil";
src: url("../fonts/FG_Virgil.woff2");
font-display: swap;
}
/* https://github.com/microsoft/cascadia-code */
@font-face {
font-family: "Cascadia";
src: url("../fonts/Cascadia.woff2");
font-display: swap;
}
.visually-hidden {
position: absolute !important;
height: 1px;

1
src/excalidraw-embed/webpack.prod.config.js

@ -6,6 +6,7 @@ module.exports = { @@ -6,6 +6,7 @@ module.exports = {
mode: "production",
entry: {
"excalidraw.min": "./index.tsx",
"fonts.min": "../../public/fonts.css",
},
output: {
path: path.resolve(__dirname, "dist"),

Loading…
Cancel
Save