1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00
This commit is contained in:
dwelle 2023-10-02 14:19:25 +02:00
parent ffa4cea61c
commit f7a6bffb99
6 changed files with 24 additions and 0 deletions

@ -111,6 +111,13 @@
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="/VirgilNew2023Beta-Regular.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="/Cascadia.woff2"

Binary file not shown.

@ -5,6 +5,12 @@
font-display: swap;
}
@font-face {
font-family: "Virgil2";
src: url("VirgilNew2023Beta-Regular.woff2");
font-display: swap;
}
/* https://github.com/microsoft/cascadia-code */
@font-face {
font-family: "Cascadia";

@ -698,6 +698,11 @@ export const actionChangeFontFamily = register({
text: t("labels.handDrawn"),
icon: FreedrawIcon,
},
{
value: FONT_FAMILY.HAND_DRAWN2.fontFamilyId,
text: t("labels.handDrawn"),
icon: FreedrawIcon,
},
{
value: FONT_FAMILY.NORMAL.fontFamilyId,
text: t("labels.normal"),

@ -98,6 +98,10 @@ export const FONT_FAMILY = {
fontFamilyId: 1,
fontFamily: "Virgil",
},
HAND_DRAWN2: {
fontFamilyId: 4,
fontFamily: "Virgil2",
},
NORMAL: {
fontFamilyId: 2,
fontFamily: "Helvetica",

@ -970,6 +970,8 @@ const DEFAULT_LINE_HEIGHT = {
// Gecko (FF) uses ~1.28.
[FONT_FAMILY.HAND_DRAWN.fontFamilyId]:
1.25 as ExcalidrawTextElement["lineHeight"],
[FONT_FAMILY.HAND_DRAWN2.fontFamilyId]:
1.25 as ExcalidrawTextElement["lineHeight"],
// ~1.15 is the average for Virgil in WebKit and Blink.
// Gecko if all over the place.
[FONT_FAMILY.NORMAL.fontFamilyId]: