feat(转换能力): 完善PDF转换与字体回退
build.yaml / build (push) Successful in 53s

This commit is contained in:
xiaoqidun committed 2026-09-27 13:11:57 +08:00
1 parent 98d9effc8c
commit affc84459e
9 files changed
+103 -37

No files matched your search

+7 -1
View File
@@ -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 读取上传字体的名称和集合索引