mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 08:05:00 -05:00
14 lines
400 B
TypeScript
14 lines
400 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 interBoldFontP = fetch(
|
|
new URL("./Inter-Bold.ttf", import.meta.url)
|
|
).then((res) => res.arrayBuffer());
|
|
|
|
return Promise.all([interRegularFontP, interBoldFontP]);
|
|
}
|