This commit is contained in:
parent
a42d1d0323
commit
523ed99f7b
@ -1,11 +1,12 @@
|
|||||||
import { type SpriteSpec, SPRITE_SPECS } from ".";
|
import { type SpriteSpec, SPRITE_SPECS } from ".";
|
||||||
import { SOUND_SPECS, SoundSpec } from "./sounds";
|
import { SOUND_SPECS, SoundSpec } from "./sounds";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.BASE_URL ?? document.location;
|
let BASE_URL = import.meta.env.BASE_URL || document.location;
|
||||||
|
BASE_URL = BASE_URL.endsWith("/") ? BASE_URL.slice(0, -1) : BASE_URL;
|
||||||
|
|
||||||
export const FONT = new FontFace(
|
export const FONT = new FontFace(
|
||||||
"scientifica",
|
"scientifica",
|
||||||
`url(${BASE_URL}fonts/scientifica.ttf)`
|
`url(${BASE_URL}/fonts/scientifica.ttf)`
|
||||||
);
|
);
|
||||||
FONT.load().then((font) => {
|
FONT.load().then((font) => {
|
||||||
document.fonts.add(font);
|
document.fonts.add(font);
|
||||||
|
Loading…
Reference in New Issue
Block a user