mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 Settings - Editor - Font is garbled on macOS https://github.com/siyuan-note/siyuan/issues/13713
This commit is contained in:
parent
fbb7bdad82
commit
2b0f2e702e
1 changed files with 1 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue