Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve the editor font setting https://github.com/siyuan-note/siyuan/issues/14818

Danielcaf457fc99fd
diff --git a/kernel/util/font.go b/kernel/util/font.go
index 4113dbb8b1..f1d4b5f233 100644
--- a/kernel/util/font.go
+++ b/kernel/util/font.go
@@ -133,9 +133,9 @@ func parseTTCFontFamily(fontPath string) (ret []string) {
continue
}
- family, _ := font.Name(nil, ttc.NameIDTypographicFamily)
+ family, _ := font.Name(nil, ttc.NameIDFamily)
if "" == family {
- family, _ = font.Name(nil, ttc.NameIDFamily)
+ family, _ = font.Name(nil, ttc.NameIDTypographicFamily)
}
family = strings.TrimSpace(family)
if "" == family || strings.HasPrefix(family, ".") {
@@ -143,6 +143,7 @@ func parseTTCFontFamily(fontPath string) (ret []string) {
}
ret = append(ret, family)
}
+ ret = gulu.Str.RemoveDuplicatedElem(ret)
return
}