fix(fonts): move fonts to public folder so that its served as static assets via cra & works in export (#2264)
This commit is contained in:
parent
6db5647048
commit
1034ec91b8
13
public/fonts.css
Normal file
13
public/fonts.css
Normal file
@ -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;
|
||||||
|
}
|
@ -81,6 +81,9 @@
|
|||||||
href="manifest.json"
|
href="manifest.json"
|
||||||
style="--pwacompat-splash-font: 24px Virgil"
|
style="--pwacompat-splash-font: 24px Virgil"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fonts.css" type="text/css" />
|
||||||
|
|
||||||
<% if (process.env.REACT_APP_INCLUDE_GTAG === 'true') { %>
|
<% if (process.env.REACT_APP_INCLUDE_GTAG === 'true') { %>
|
||||||
<script
|
<script
|
||||||
async
|
async
|
||||||
@ -109,20 +112,6 @@
|
|||||||
height: 100vh;
|
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 {
|
.visually-hidden {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
|
@ -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 {
|
.visually-hidden {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
|
@ -6,6 +6,7 @@ module.exports = {
|
|||||||
mode: "production",
|
mode: "production",
|
||||||
entry: {
|
entry: {
|
||||||
"excalidraw.min": "./index.tsx",
|
"excalidraw.min": "./index.tsx",
|
||||||
|
"fonts.min": "../../public/fonts.css",
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user