diff --git a/app/index.css b/app/index.css index 94ef8483..6f1a3af2 100644 --- a/app/index.css +++ b/app/index.css @@ -1,3 +1,8 @@ +@font-face { + font-family: "Assistant"; + src: url("assets/font/Assistant.ttf") format("ttf"); +} + * { box-sizing: border-box; font-family: Assistant, Helvetica, sans-serif; diff --git a/app/src/App.ts b/app/src/App.ts index d2123d49..371c78d6 100644 --- a/app/src/App.ts +++ b/app/src/App.ts @@ -343,8 +343,9 @@ document.querySelector("body")!.innerHTML = `
` WebFont.load({ - google: { - families: ["Assistant:200,300,400,500,600,700,800&display=swap"], + custom: { + families: ["Assistant"], + urls: ["index.css"], }, active: init, inactive: init, diff --git a/public/assets/font/Assistant.ttf b/public/assets/font/Assistant.ttf new file mode 100644 index 00000000..e4ad9382 Binary files /dev/null and b/public/assets/font/Assistant.ttf differ diff --git a/vite.config.js b/vite.config.js index ddd1c8f1..dd2147f2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -27,7 +27,7 @@ export default defineConfig({ ] }, workbox: { - globPatterns: ['**/*.{js,css,html}', 'assets/*'], + globPatterns: ['**/*.{js,css,html}', 'assets/**/*'], } })