Bring root fonts back (#1422)
* redirect font loading * bring preloading back * change paths * add css type * move fonts to root * correct paths * remove redirects * correct ext * remove fonts from main CSS * remove unneeded fonts Co-authored-by: kbariotis <konmpar@gmail.com>
This commit is contained in:
parent
cca15b0640
commit
51ccf61cc6
@ -1,13 +1,13 @@
|
|||||||
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
|
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Virgil";
|
font-family: "Virgil";
|
||||||
src: url("../fonts/FG_Virgil.woff2");
|
src: url("FG_Virgil.woff2");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://github.com/microsoft/cascadia-code */
|
/* https://github.com/microsoft/cascadia-code */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Cascadia";
|
font-family: "Cascadia";
|
||||||
src: url("../fonts/Cascadia.woff2");
|
src: url("Cascadia.woff2");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
@ -65,6 +65,22 @@
|
|||||||
<!-- OG tags require absolute url for images -->
|
<!-- OG tags require absolute url for images -->
|
||||||
<meta name="twitter:image" content="https://excalidraw.com/og-image.png" />
|
<meta name="twitter:image" content="https://excalidraw.com/og-image.png" />
|
||||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||||
|
<link rel="stylesheet" href="fonts.css" type="text/css" />
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="FG_Virgil.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="Cascadia.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
|
||||||
<link
|
<link
|
||||||
href="https://excalidraw-socket.herokuapp.com/socket.io"
|
href="https://excalidraw-socket.herokuapp.com/socket.io"
|
||||||
rel="preconnect"
|
rel="preconnect"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
@import "./_variables";
|
@import "./_variables";
|
||||||
@import "./theme";
|
@import "./theme";
|
||||||
@import "./fonts";
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--sat: env(safe-area-inset-top);
|
--sat: env(safe-area-inset-top);
|
||||||
|
@ -54,8 +54,8 @@ const elements = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
registerFont("./static/fonts/FG_Virgil.ttf", { family: "Virgil" });
|
registerFont("./public/FG_Virgil.ttf", { family: "Virgil" });
|
||||||
registerFont("./static/fonts/Cascadia.ttf", { family: "Cascadia" });
|
registerFont("./public/Cascadia.ttf", { family: "Cascadia" });
|
||||||
|
|
||||||
const canvas = exportToCanvas(
|
const canvas = exportToCanvas(
|
||||||
elements as any,
|
elements as any,
|
||||||
|
@ -94,11 +94,11 @@ export function exportToSvg(
|
|||||||
<style>
|
<style>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Virgil";
|
font-family: "Virgil";
|
||||||
src: url("https://excalidraw.com/static/fonts/FG_Virgil.woff2");
|
src: url("https://excalidraw.com/FG_Virgil.woff2");
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Cascadia";
|
font-family: "Cascadia";
|
||||||
src: url("https://excalidraw.com/static/fonts/Cascadia.woff2");
|
src: url("https://excalidraw.com/Cascadia.woff2");
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</defs>
|
</defs>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user