Update inter to 4.1

This commit is contained in:
Fedor Indutny
2025-03-31 12:07:27 -07:00
committed by GitHub
parent 22fb468481
commit 81065aaebd
11 changed files with 6 additions and 80 deletions

View File

@@ -29,54 +29,17 @@
<title>Signal</title>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-BoldItalic.woff2"
href="fonts/InterVariable.woff2"
as="font"
crossorigin
type="font/woff2"
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-Bold.woff2"
as="font"
type="font/woff2"
crossorigin
href="images/signal-logo.svg"
as="image"
crossorigin="anonymous"
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-SemiBoldItalic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-Italic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-SemiBold.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-Regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="fonts/inter-v3.19/Inter-Medium.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="preload" href="images/signal-logo.svg" as="image" crossorigin />
<link
href="node_modules/sanitize.css/sanitize.css"

BIN
fonts/InterVariable.woff2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,41 +3,7 @@
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-BoldItalic.woff2');
font-weight: bolder;
font-style: italic;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-Bold.woff2');
font-weight: bolder;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-SemiBoldItalic.woff2');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-Italic.woff2');
font-style: italic;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-SemiBold.woff2');
font-weight: bold;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-Medium.woff2');
font-weight: 500;
}
@font-face {
font-family: 'Inter';
src: url('../fonts/inter-v3.19/Inter-Regular.woff2');
src: url('../fonts/InterVariable.woff2');
}
@font-face {

View File

@@ -42,10 +42,7 @@ async function drawImage(
}
async function getFont(text: string): Promise<string> {
const font = new window.FontFace(
'Inter',
'url("fonts/inter-v3.19/Inter-Regular.woff2")'
);
const font = new window.FontFace('Inter', 'url("fonts/InterVariable.woff2")');
await font.load();
const measurerCanvas = document.createElement('canvas');