2025-03-08 15:21:26 -06:00
|
|
|
// For Edge runtime, we need to use fetch instead of fs
|
|
|
|
|
export async function loadFonts() {
|
2025-03-09 20:17:47 -05:00
|
|
|
const interRegularFontP = fetch(
|
|
|
|
|
new URL("./Inter-Regular.ttf", import.meta.url)
|
|
|
|
|
).then((res) => res.arrayBuffer());
|
2025-03-08 15:21:26 -06:00
|
|
|
|
2025-03-09 20:17:47 -05:00
|
|
|
const interMediumFontP = fetch(
|
|
|
|
|
new URL("./Inter-Medium.ttf", import.meta.url)
|
|
|
|
|
).then((res) => res.arrayBuffer());
|
2025-03-08 15:21:26 -06:00
|
|
|
|
2025-03-09 20:17:47 -05:00
|
|
|
const interBoldFontP = fetch(
|
|
|
|
|
new URL("./Inter-Bold.ttf", import.meta.url)
|
|
|
|
|
).then((res) => res.arrayBuffer());
|
2025-03-08 15:21:26 -06:00
|
|
|
|
2025-03-09 20:17:47 -05:00
|
|
|
return Promise.all([interRegularFontP, interMediumFontP, interBoldFontP]);
|
2025-03-08 15:21:26 -06:00
|
|
|
}
|