mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:31:12 +08:00
feat(原生桌面): 完善字体别名与集合匹配
This commit is contained in:
1 parent
92785cea4f
commit
a4f979ed2f
2 files changed
+2
-2
No files matched your search
@@ -707,7 +707,7 @@ func (h *Host) readFonts() {
|
||||
for _, face := range faces {
|
||||
h.fonts = append(h.fonts, map[string]any{"index": face.Index, "postscriptName": face.PostScriptName, "fullName": face.FullName, "family": face.Family, "style": face.Style, "names": face.Names, "file": file})
|
||||
for _, alias := range append([]string{face.FullName, face.Family, face.PostScriptName, strings.TrimSpace(face.Family + " " + face.Style)}, face.Names...) {
|
||||
if alias != "" {
|
||||
if alias != "" && h.fontFiles[alias+".ttf"] == "" {
|
||||
h.fontFiles[alias+".ttf"] = name + "\x00" + strconv.Itoa(face.Index)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user