Skip to content

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

:bug: The font Noto Sans SC is not available https://github.com/siyuan-note/siyuan/issues/15238

Danielc060b093ee62
diff --git a/kernel/util/font.go b/kernel/util/font.go
index f1d4b5f233..643beee7d9 100644
--- a/kernel/util/font.go
+++ b/kernel/util/font.go
@@ -52,24 +52,12 @@ func LoadSysFonts() (ret []string) {
ret = append(ret, font.Family)
}
ret = gulu.Str.RemoveDuplicatedElem(ret)
- ret = removeUnusedFonts(ret)
sort.Strings(ret)
sysFonts = ret
logging.LogInfof("loaded system fonts [%d] in [%dms]", len(sysFonts), time.Since(start).Milliseconds())
return
}
-func removeUnusedFonts(fonts []string) (ret []string) {
- ret = []string{}
- for _, font := range fonts {
- if strings.HasPrefix(font, "Noto Sans") {
- continue
- }
- ret = append(ret, font)
- }
- return
-}
-
type Font struct {
Path string
Family string