From 51ccf61cc65b09b8099d5aea2685d9439af80b44 Mon Sep 17 00:00:00 2001 From: Faustino Kialungila Date: Mon, 13 Apr 2020 21:53:07 +0200 Subject: [PATCH] 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 --- {src/fonts => public}/Cascadia.ttf | Bin {src/fonts => public}/Cascadia.woff2 | Bin {src/fonts => public}/FG_Virgil.otf | Bin {src/fonts => public}/FG_Virgil.ttf | Bin {src/fonts => public}/FG_Virgil.woff2 | Bin src/css/fonts.scss => public/fonts.css | 4 ++-- public/index.html | 16 ++++++++++++++++ src/css/styles.scss | 1 - src/index-node.ts | 4 ++-- src/scene/export.ts | 4 ++-- 10 files changed, 22 insertions(+), 7 deletions(-) rename {src/fonts => public}/Cascadia.ttf (100%) rename {src/fonts => public}/Cascadia.woff2 (100%) rename {src/fonts => public}/FG_Virgil.otf (100%) rename {src/fonts => public}/FG_Virgil.ttf (100%) rename {src/fonts => public}/FG_Virgil.woff2 (100%) rename src/css/fonts.scss => public/fonts.css (74%) diff --git a/src/fonts/Cascadia.ttf b/public/Cascadia.ttf similarity index 100% rename from src/fonts/Cascadia.ttf rename to public/Cascadia.ttf diff --git a/src/fonts/Cascadia.woff2 b/public/Cascadia.woff2 similarity index 100% rename from src/fonts/Cascadia.woff2 rename to public/Cascadia.woff2 diff --git a/src/fonts/FG_Virgil.otf b/public/FG_Virgil.otf similarity index 100% rename from src/fonts/FG_Virgil.otf rename to public/FG_Virgil.otf diff --git a/src/fonts/FG_Virgil.ttf b/public/FG_Virgil.ttf similarity index 100% rename from src/fonts/FG_Virgil.ttf rename to public/FG_Virgil.ttf diff --git a/src/fonts/FG_Virgil.woff2 b/public/FG_Virgil.woff2 similarity index 100% rename from src/fonts/FG_Virgil.woff2 rename to public/FG_Virgil.woff2 diff --git a/src/css/fonts.scss b/public/fonts.css similarity index 74% rename from src/css/fonts.scss rename to public/fonts.css index 87b5339e..165bf6a5 100644 --- a/src/css/fonts.scss +++ b/public/fonts.css @@ -1,13 +1,13 @@ /* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */ @font-face { font-family: "Virgil"; - src: url("../fonts/FG_Virgil.woff2"); + src: url("FG_Virgil.woff2"); font-display: swap; } /* https://github.com/microsoft/cascadia-code */ @font-face { font-family: "Cascadia"; - src: url("../fonts/Cascadia.woff2"); + src: url("Cascadia.woff2"); font-display: swap; } diff --git a/public/index.html b/public/index.html index 39179f00..8f6b6343 100644 --- a/public/index.html +++ b/public/index.html @@ -65,6 +65,22 @@ + + + + @font-face { font-family: "Virgil"; - src: url("https://excalidraw.com/static/fonts/FG_Virgil.woff2"); + src: url("https://excalidraw.com/FG_Virgil.woff2"); } @font-face { font-family: "Cascadia"; - src: url("https://excalidraw.com/static/fonts/Cascadia.woff2"); + src: url("https://excalidraw.com/Cascadia.woff2"); }