feat(转换能力): 修复PDF字体转换
build.yaml / build (push) Successful in 52s

This commit is contained in:
xiaoqidun committed 2026-10-14 18:46:22 +08:00
1 parent 9791571d75
commit ef901bea0f
2 files changed
+40

No files matched your search

+4
View File
@@ -91,6 +91,10 @@ func FontProgram(source *pdfgo.Font, type1 *basefont.Type1Program) ([]byte, Font
return nil, repair, err
}
changed := repair.Locations
if os2 := basefont.NormalizeOS2(tables["OS/2"]); len(os2) != len(tables["OS/2"]) {
tables["OS/2"] = os2
changed = true
}
if head := tables["head"]; len(head) == 56 && binary.BigEndian.Uint32(head[:4]) == 0x00010000 && head[54] == 0 && head[55] == 0 {
tables["head"] = head[:54]
changed = true