diff --git a/packages/frontend/src/scripts/font-settings.ts b/packages/frontend/src/scripts/font-settings.ts index 35ced05bb..cde477271 100644 --- a/packages/frontend/src/scripts/font-settings.ts +++ b/packages/frontend/src/scripts/font-settings.ts @@ -82,6 +82,18 @@ export function getDefaultFontSettings() { console.log(newFontId); } + if (fontFace.value !== 'system-ui') { + if (window.requestIdleCallback) { + window.requestIdleCallback(() => { + loadFontStyle(fontFace.value); + }); + } else { + setTimeout(() => { + loadFontStyle(fontFace.value); + }, 0); + } + } + watch(fontFace, (newVal) => { const optionsList = getFontOptionsList(newVal); if (optionsList.length !== 0) {