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
fc2411f5bd
commit
4554290d7b
1 changed files with 5 additions and 0 deletions
|
|
@ -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, ".") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue