diff --git a/src/module/fonts.ts b/src/module/fonts.ts index 75c52bdc..ec0e72e1 100644 --- a/src/module/fonts.ts +++ b/src/module/fonts.ts @@ -2,8 +2,18 @@ // // SPDX-License-Identifier: MIT -const fonts = ["Lora", "Wood Stamp"]; +const basicFonts = ["Wood Stamp"]; +const variantFonts = ["Lora"]; export async function preloadFonts(): Promise { - return Promise.all(fonts.map((font) => document.fonts.load(`1rem ${font}`))); + 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))); } diff --git a/src/module/handlebars/handlebars-helpers.ts b/src/module/handlebars/handlebars-helpers.ts index 4799b909..004f31e7 100644 --- a/src/module/handlebars/handlebars-helpers.ts +++ b/src/module/handlebars/handlebars-helpers.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT export default function registerHandlebarsHelpers(): void { - Object.entries(helpers).forEach(([key, helper]) => Handlebars.registerHelper(key, helper)); + Handlebars.registerHelper(helpers); } const helpers = {