From a868ef584a059331a970c4c3de51bc58c7a4455e Mon Sep 17 00:00:00 2001 From: mai <74494945+chan-mai@users.noreply.github.com> Date: Mon, 6 May 2024 10:12:38 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=81=86=E3=81=94=E3=81=8F=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/boot/common.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 94040c6413..8f0d77c67e 100755 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -23,6 +23,7 @@ import { deckStore } from '@/ui/deck/deck-store.js'; import { miLocalStorage } from '@/local-storage.js'; import { fetchCustomEmojis } from '@/custom-emojis.js'; import { setupRouter } from '@/router/definition.js'; +import { applyFont } from '@/scripts/font'; export async function common(createVue: () => App) { console.info(`Sharkey v${version}`); @@ -165,6 +166,15 @@ export async function common(createVue: () => App) { } }); + //# Custom font + if (defaultStore.state.customFont) { + applyFont(defaultStore.state.customFont); + } + + watch(defaultStore.reactiveState.customFont, (font) => { + applyFont(font); + }); + //#region Sync dark mode if (ColdDeviceStorage.get('syncDeviceDarkMode')) { defaultStore.set('darkMode', isDeviceDarkmode());