summaryrefslogtreecommitdiff
path: root/src/engine/config/assets.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/config/assets.ts')
-rw-r--r--src/engine/config/assets.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/config/assets.ts b/src/engine/config/assets.ts
index bf41461..5ce13e8 100644
--- a/src/engine/config/assets.ts
+++ b/src/engine/config/assets.ts
@@ -1,5 +1,10 @@
import { type SpriteSpec, SPRITE_SPECS } from ".";
+export const FONT = new FontFace("scientifica", "url(/fonts/scientifica.ttf)");
+FONT.load().then((font) => {
+ document.fonts.add(font);
+});
+
export const IMAGES = new Map<string, HTMLImageElement>();
export const loadSpritesIntoImageElements = (
@@ -37,5 +42,6 @@ export const loadAssets = () =>
(key) => SPRITE_SPECS.get(key) as SpriteSpec,
),
),
+ FONT.load(),
// TODO: Sound
]);