refactor: resturcture files so that lincensing info can be bundled properly

This commit is contained in:
Johannes Loher 2022-01-31 15:13:32 +01:00
parent 699ba74840
commit 1aa284311f
484 changed files with 119 additions and 179 deletions

View file

@ -1,19 +0,0 @@
// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT
const basicFonts = ["Wood Stamp"];
const variantFonts = ["Lora"];
export async function preloadFonts(): Promise<FontFace[][]> {
const fonts = [
...basicFonts.map((font) => `1rem ${font}`),
...variantFonts.flatMap((font) => [
`1rem ${font}`,
`bold 1rem ${font}`,
`italic 1rem ${font}`,
`bold italic 1rem ${font}`,
]),
];
return Promise.all(fonts.map((font) => document.fonts.load(font)));
}