mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 16:59:27 +08:00
1 parent
98d9effc8c
commit
affc84459e
9 files changed
+103
-37
No files matched your search
@@ -921,7 +921,13 @@ func matchFontFiles(args []js.Value) (any, error) {
|
||||
if currentSession == nil {
|
||||
return nil, fmt.Errorf("ofd document is not opened")
|
||||
}
|
||||
return currentSession.Reader.MatchFontFiles(stringsFromJS(args[0]))
|
||||
ids := make([]string, 0, len(currentSession.fontInfos))
|
||||
for _, info := range currentSession.fontInfos {
|
||||
if info.Used > 0 {
|
||||
ids = append(ids, info.ID)
|
||||
}
|
||||
}
|
||||
return currentSession.Reader.MatchFontFiles(stringsFromJS(args[0]), ids...)
|
||||
}
|
||||
|
||||
// fontFaces 读取上传字体的名称和集合索引
|
||||
|
||||
Reference in new issue
Block a user