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

View File

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

Binary file not shown.

View File

@ -5,6 +5,12 @@
font-display: swap; font-display: swap;
} }
@font-face {
font-family: "Virgil2";
src: url("VirgilNew2023Beta-Regular.woff2");
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";

View File

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

View File

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

View File

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