修复字体设置某些字体无法应用的问题
This commit is contained in:
@@ -34,7 +34,7 @@ export default {
|
||||
return name
|
||||
})
|
||||
const lrcStyles = computed(() => ({
|
||||
fontFamily: setting['desktopLyric.style.font'],
|
||||
fontFamily: /\s/.test(setting['desktopLyric.style.font']) ? `"${setting['desktopLyric.style.font']}"` : setting['desktopLyric.style.font'],
|
||||
fontSize: Math.trunc(setting['desktopLyric.style.fontSize']) + 'px',
|
||||
opacity: setting['desktopLyric.style.opacity'] / 100,
|
||||
textAlign: setting['desktopLyric.style.align'],
|
||||
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
return name
|
||||
})
|
||||
const lrcStyles = computed(() => ({
|
||||
fontFamily: setting['desktopLyric.style.font'],
|
||||
fontFamily: /\s/.test(setting['desktopLyric.style.font']) ? `"${setting['desktopLyric.style.font']}"` : setting['desktopLyric.style.font'],
|
||||
fontSize: Math.trunc(setting['desktopLyric.style.fontSize']) + 'px',
|
||||
opacity: setting['desktopLyric.style.opacity'] / 100,
|
||||
textAlign: setting['desktopLyric.style.align'],
|
||||
|
||||
@@ -27,7 +27,7 @@ export default () => {
|
||||
})
|
||||
|
||||
watch(() => appSetting['common.font'], (val) => {
|
||||
document.documentElement.style.fontFamily = val
|
||||
document.documentElement.style.fontFamily = /\s/.test(val) ? `"${val}"` : val
|
||||
}, {
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user