mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 13:34:59 -05:00
17 lines
531 B
TypeScript
17 lines
531 B
TypeScript
|
|
// For Edge runtime, we need to use fetch instead of fs
|
||
|
|
export async function loadFonts() {
|
||
|
|
const interRegularFontP = fetch(
|
||
|
|
new URL("./Inter-Regular.ttf", import.meta.url),
|
||
|
|
).then((res) => res.arrayBuffer());
|
||
|
|
|
||
|
|
const interMediumFontP = fetch(
|
||
|
|
new URL("./Inter-Medium.ttf", import.meta.url),
|
||
|
|
).then((res) => res.arrayBuffer());
|
||
|
|
|
||
|
|
const interBoldFontP = fetch(
|
||
|
|
new URL("./Inter-Bold.ttf", import.meta.url),
|
||
|
|
).then((res) => res.arrayBuffer());
|
||
|
|
|
||
|
|
return Promise.all([interRegularFontP, interMediumFontP, interBoldFontP]);
|
||
|
|
}
|