mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 07:06:44 -06:00
frontend: fix fonts loading
This commit is contained in:
parent
966f8197eb
commit
8caf4e33b3
1 changed files with 12 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue