1import { readFile } from "node:fs/promises";
2import { fileURLToPath } from "node:url";
3import type { Font } from "takumi-js";
4
5export const brandFonts = await Promise.all(
6 [
7 {
8 name: "Source Serif 4",
9 style: "normal",
10 file: import.meta
11 .resolve("@fontsource-variable/source-serif-4/files/source-serif-4-latin-opsz-normal.woff2"),
12 },
13 {
14 name: "Source Serif 4",
15 style: "italic",
16 file: import.meta
17 .resolve("@fontsource-variable/source-serif-4/files/source-serif-4-latin-opsz-italic.woff2"),
18 },
19 {
20 name: "JetBrains Mono",
21 style: "normal",
22 file: import.meta
23 .resolve("@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2"),
24 },
25 {
26 name: "Caveat",
27 style: "normal",
28 file: import.meta
29 .resolve("@fontsource-variable/caveat/files/caveat-latin-wght-normal.woff2"),
30 },
31 ].map(
32 async ({ name, style, file }) =>
33 ({
34 name,
35 style,
36 data: await readFile(fileURLToPath(file)),
37 }) satisfies Font,
38 ),
39);