mirror of
https://github.com/paricafe/misskey.git
synced 2025-02-17 14:47:29 -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);
|
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) => {
|
watch(fontFace, (newVal) => {
|
||||||
const optionsList = getFontOptionsList(newVal);
|
const optionsList = getFontOptionsList(newVal);
|
||||||
if (optionsList.length !== 0) {
|
if (optionsList.length !== 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue