Use woff2 instead ttf (#1307)

* Use woff2 instead ttf

* Update font in svg-exported files to use woff2

Co-authored-by: Timur Khazamov <t1mmaas@skbkontur.ru>
This commit is contained in:
Timur Khazamov 2020-04-08 00:28:44 +02:00 committed by GitHub
parent c3b83fba38
commit ed378170b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

BIN
public/Cascadia.woff2 Normal file

Binary file not shown.

BIN
public/FG_Virgil.woff2 Normal file

Binary file not shown.

View File

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

View File

@ -67,16 +67,16 @@
<link rel="stylesheet" href="fonts.css" />
<link
rel="preload"
href="FG_Virgil.ttf"
href="FG_Virgil.woff2"
as="font"
type="font/ttf"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="Cascadia.ttf"
href="Cascadia.woff2"
as="font"
type="font/ttf"
type="font/woff2"
crossorigin="anonymous"
/>
<link

View File

@ -94,11 +94,11 @@ export function exportToSvg(
<style>
@font-face {
font-family: "Virgil";
src: url("https://excalidraw.com/FG_Virgil.ttf");
src: url("https://excalidraw.com/FG_Virgil.woff2");
}
@font-face {
font-family: "Cascadia";
src: url("https://excalidraw.com/Cascadia.ttf");
src: url("https://excalidraw.com/Cascadia.woff2");
}
</style>
</defs>