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

Daniel2b0f2e702e44
diff --git a/kernel/util/font.go b/kernel/util/font.go
index 97ad30b7f2..0b1824ee42 100644
--- a/kernel/util/font.go
+++ b/kernel/util/font.go
@@ -125,20 +125,7 @@ func loadFonts() (ret []*Font) {
continue
}
- if sfnt.PlatformLanguageID(1033) == e.LanguageID {
- v, _, err := transform.Bytes(textUnicode.UTF16(textUnicode.BigEndian, textUnicode.IgnoreBOM).NewDecoder(), e.Value)
- if err != nil {
- //LogErrorf("decode font family [%s] failed: %s", fontPath, err)
- continue
- }
- val := string(v)
- if sfnt.NameFontFamily == e.NameID && "" != val {
- family = val
- }
- if sfnt.NamePreferredFamily == e.NameID && "" != val {
- family = val
- }
- } else if sfnt.PlatformLanguageID(2052) == e.LanguageID {
+ if sfnt.PlatformLanguageID(1033) == e.LanguageID || sfnt.PlatformLanguageID(2052) == e.LanguageID {
v, _, err := transform.Bytes(textUnicode.UTF16(textUnicode.BigEndian, textUnicode.IgnoreBOM).NewDecoder(), e.Value)
if err != nil {
//LogErrorf("decode font family [%s] failed: %s", fontPath, err)