Skip to content

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

:bug: Settings - Editor - Font is garbled on macOS https://github.com/siyuan-note/siyuan/issues/13713

Daniel4554290d7bba
diff --git a/kernel/util/font.go b/kernel/util/font.go
index 97ad30b7f2..82bce84a93 100644
--- a/kernel/util/font.go
+++ b/kernel/util/font.go
@@ -78,6 +78,9 @@ type Font struct {
func loadFonts() (ret []*Font) {
ret = []*Font{}
for _, fontPath := range findfont.List() {
+ if strings.Contains(fontPath, "AppData") {
+ logging.LogInfof("skip font [%s]", fontPath)
+ }
if strings.HasSuffix(strings.ToLower(fontPath), ".ttc") {
data, err := os.ReadFile(fontPath)
if err != nil {
@@ -151,6 +154,8 @@ func loadFonts() (ret []*Font) {
if sfnt.NamePreferredFamily == e.NameID && "" != val {
family = val
}
+ } else {
+ logging.LogInfof("skip font family [%s] [%+v]", fontPath, e)
}
}
if "" != family && !strings.HasPrefix(family, ".") {