font: load CJK fonts only in CJK env or the book has CJK languages, closes #1298 (#1323)

This commit is contained in:
Huang Xin
2025-06-03 14:55:40 +08:00
committed by GitHub
parent 734e22d92c
commit 146a71fdef
9 changed files with 136 additions and 103 deletions
@@ -15,8 +15,8 @@ import { useSettingsStore } from '@/store/settingsStore';
import { useDeviceControlStore } from '@/store/deviceStore';
import { useScreenWakeLock } from '@/hooks/useScreenWakeLock';
import { eventDispatcher } from '@/utils/event';
import { interceptGlobalOpen } from '@/utils/open';
import { mountAdditionalFonts } from '@/utils/style';
import { interceptWindowOpen } from '@/utils/open';
import { mountAdditionalFonts } from '@/utils/font';
import { setSystemUIVisibility } from '@/utils/bridge';
import { AboutWindow } from '@/components/AboutWindow';
import { UpdaterWindow } from '@/components/UpdaterWindow';
@@ -40,7 +40,7 @@ const Reader: React.FC<{ ids?: string }> = ({ ids }) => {
useEffect(() => {
mountAdditionalFonts(document);
interceptGlobalOpen();
interceptWindowOpen();
}, []);
useEffect(() => {