From 11662e248f8df959b28fad314efa539c15496127 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Mon, 22 Aug 2022 08:14:04 -0500 Subject: [PATCH] Use fontsource for loading webfonts offline --- index.html | 6 ------ package-lock.json | 22 ++++++++++++++++++++++ package.json | 2 ++ src/App.vue | 1 + src/main.ts | 1 + 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index f5827fd..9cc3526 100644 --- a/index.html +++ b/index.html @@ -5,12 +5,6 @@ - - - - - - diff --git a/package-lock.json b/package-lock.json index 01def00..a44ec54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,8 @@ "name": "profectus", "version": "0.5.1", "dependencies": { + "@fontsource/material-icons": "^4.5.4", + "@fontsource/roboto-mono": "^4.5.8", "@pixi/app": "~6.3.2", "@pixi/core": "~6.3.2", "@pixi/particle-emitter": "^5.0.4", @@ -1662,6 +1664,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@fontsource/material-icons": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/@fontsource/material-icons/-/material-icons-4.5.4.tgz", + "integrity": "sha512-YGmXkkEdu6EIgpFKNmB/nIXzZocwSmbI01Ninpmml8x8BT0M6RR++V1KqOfpzZ6Cw/FQ2/KYonQ3x4IY/4VRRA==" + }, + "node_modules/@fontsource/roboto-mono": { + "version": "4.5.8", + "resolved": "https://registry.npmjs.org/@fontsource/roboto-mono/-/roboto-mono-4.5.8.tgz", + "integrity": "sha512-AW44UkbQD0w1CT5mzDbsvhGZ6/bb0YmZzoELj6Sx8vcVEzcbYGUdt2Dtl5zqlOuYMWQFY1mniwWyVv+Bm/lVxw==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", @@ -8305,6 +8317,16 @@ } } }, + "@fontsource/material-icons": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/@fontsource/material-icons/-/material-icons-4.5.4.tgz", + "integrity": "sha512-YGmXkkEdu6EIgpFKNmB/nIXzZocwSmbI01Ninpmml8x8BT0M6RR++V1KqOfpzZ6Cw/FQ2/KYonQ3x4IY/4VRRA==" + }, + "@fontsource/roboto-mono": { + "version": "4.5.8", + "resolved": "https://registry.npmjs.org/@fontsource/roboto-mono/-/roboto-mono-4.5.8.tgz", + "integrity": "sha512-AW44UkbQD0w1CT5mzDbsvhGZ6/bb0YmZzoELj6Sx8vcVEzcbYGUdt2Dtl5zqlOuYMWQFY1mniwWyVv+Bm/lVxw==" + }, "@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", diff --git a/package.json b/package.json index a073ad8..5b315fa 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "serve": "vite preview --host" }, "dependencies": { + "@fontsource/material-icons": "^4.5.4", + "@fontsource/roboto-mono": "^4.5.8", "@pixi/app": "~6.3.2", "@pixi/core": "~6.3.2", "@pixi/particle-emitter": "^5.0.4", diff --git a/src/App.vue b/src/App.vue index b784d5e..05fa7fd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,6 +23,7 @@ import projInfo from "./data/projInfo.json"; import themes from "./data/themes"; import settings, { gameComponents } from "./game/settings"; import "./main.css"; +import "@fontsource/roboto-mono"; import type { CSSProperties } from "vue"; const useHeader = projInfo.useHeader; diff --git a/src/main.ts b/src/main.ts index 2896796..2d27dcc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +import "@fontsource/material-icons"; import App from "App.vue"; import projInfo from "data/projInfo.json"; import "game/notifications";