ds4/src/module/fonts.ts

10 lines
268 B
TypeScript
Raw Normal View History

2021-07-08 23:32:22 +02:00
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
const fonts = ["Lora", "Wood Stamp"];
export async function preloadFonts(): Promise<FontFace[][]> {
return Promise.all(fonts.map((font) => document.fonts.load(`1rem ${font}`)));
}