mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve the editor font setting https://github.com/siyuan-note/siyuan/issues/14818
This commit is contained in:
parent
de090512ad
commit
caf457fc99
1 changed files with 3 additions and 2 deletions
|
|
@ -133,9 +133,9 @@ func parseTTCFontFamily(fontPath string) (ret []string) {
|
|||
continue
|
||||
}
|
||||
|
||||
family, _ := font.Name(nil, ttc.NameIDTypographicFamily)
|
||||
family, _ := font.Name(nil, ttc.NameIDFamily)
|
||||
if "" == family {
|
||||
family, _ = font.Name(nil, ttc.NameIDFamily)
|
||||
family, _ = font.Name(nil, ttc.NameIDTypographicFamily)
|
||||
}
|
||||
family = strings.TrimSpace(family)
|
||||
if "" == family || strings.HasPrefix(family, ".") {
|
||||
|
|
@ -143,6 +143,7 @@ func parseTTCFontFamily(fontPath string) (ret []string) {
|
|||
}
|
||||
ret = append(ret, family)
|
||||
}
|
||||
ret = gulu.Str.RemoveDuplicatedElem(ret)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue