R7.4: an unembedded font is no damage (#5)
The warning watch skips MuPDF's non-embedded font notice and its repeat counts. Text and search reads are watched too: damage they meet is kept on the document, told by the next draw or picture check, and fails image and text exports until then. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
969cb67c96
commit
6b676e06e6
9 files changed
+191
-9
No files matched your search
+1
-1
@@ -279,7 +279,7 @@
|
||||
- [x] R7.1 合集安装包(§4,用户定):macOS 一个公证的 dmg 装六个 .app 与“应用程序”替身,用户拖入所要的;Windows 一个安装程序,组件页勾选六个应用,每个与单独安装程序装得一样;Linux 不做合集;单个应用的包照旧(`release.sh` 的 `dmg` 单个与合集共用,Mac mini 上以两个假应用核对卷内内容;`bundle.nsi` 逐个以 `/S` 运行所选的安装程序,某个退出码非零即停下并写明;`windows-bundle.sh` 三个假应用:都装上,第二个被拒时退出码 2、第三个不运行;真包随 R7.7 建出 — 第 1 轮:被拒的是最后一个,去掉 `Abort` 测试仍过;加第三个应用后去掉即失败;第 2 轮 PASS)
|
||||
- [x] R7.2 设置窗口多出一行应用菜单(#6,§5):设置窗口沿用主窗口的外壳 `Shell`,Windows 与 Linux 上随之画出菜单栏与更新横幅;设置窗口不画这两者(`Shell::secondary`;测试量内容起点距标题栏底,五种变体各自失败 — 第 1 轮:只查标记容器;第 2 轮:主窗口两者合计;第 3 轮 PASS)
|
||||
- [x] R7.3 装了宋体仍报缺少(#4,§7、§8):内核按 `宋体` 找到 SimSun,缺字检查却比较原名与所用字体的英文名,报为缺失;查明 Linux 上的版面是否真用 SimSun,一页变两页的根因(补丁 0048:缺字检查比较 `GetEnglishSearchFontName`;Windows 与 WSL 内核已重建;`navigate/tests.rs` 的 `DEJAVU SANS` 用例修前失败、修后通过,ElyDoc 单线程 55 项通过;Arch 容器装 0.1.5 包与 simsun.ttc:修前报缺宋体,正文实为 SimSun,一页;换上新内核不再报缺,仍一页。一页变两页未能复现,需报告者的文件 — 第 1 轮 PASS)
|
||||
- [ ] R7.4 打开 PDF 总说已损坏(#5,§11):画图块时 MuPDF 的任何警告都算损坏,未嵌入的中日韩字体(“non-embedded font using identity encoding”)即触发;损坏只认结构修复、读不出的对象与流、画不出的图片与内容
|
||||
- [x] R7.4 打开 PDF 总说已损坏(#5,§11):画图块时 MuPDF 的任何警告都算损坏,未嵌入的中日韩字体(“non-embedded font using identity encoding”)即触发;损坏只认结构修复、读不出的对象与流、画不出的图片与内容
|
||||
- [ ] R7.5 ElyMark 打开的正文块变成一块深色框(§14,用户定):按下的段落保持原样,不加底色与内边距,不挪位置;代码块仍有自己的底板
|
||||
- [ ] R7.6 Windows 与 Linux 不能打印(#3,§19.3):`print_pdf` 只有 macOS;Windows 用系统打印对话框,Linux 经 xdg 桌面门户的打印接口
|
||||
- [ ] R7.7 发布 0.1.6:版本号,三端建包、签名公证、上传,合集包一并上传,本机装上
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
FAIL
|
||||
|
||||
1. crates/ely-pdf-engine/shim/ely_mupdf.c:253 — Tile rendering discards content errors while building the display list. The opening scan decodes streams but does not interpret their drawing commands. With a sound cross-reference table and content `BT 72 700 Td (Missing text) Tj ET`, MuPDF warns that it cannot draw the text, yet this change returns an entirely white tile with `damaged = false`, no repair report, and `check_pictures = false`. HEAD reports damage for the same file. Thus unreadable content loses its warning and protection against overwriting the original, contrary to R7.4 and PDF-14. `BT ] ET` also reproduces this regression; the new assertion in agents.md:314 that syntax errors only reach the error callback is false. Preserve content failures during display-list construction while excluding the harmless font notices specifically, add regressions for these cases, and correct that assertion. Windows comparison evidence: `.work/R7.4-r1-compare.log`.
|
||||
|
||||
2. crates/ely-pdf-engine/shim/ely_mupdf.c:250; crates/ely-pdf-engine/shim/ely_output.c:60 — The unmonitored export pass caches images as well as fonts, so a second pass cannot reliably detect damage. Reproduction: a 4×4 RGB image with `/Filter [/FlateDecode /ASCIIHexDecode]`, containing zlib-compressed `ff0000` repeated 16 times followed by `>`, with its four checksum bytes replaced by zeros. MuPDF reports `ignoring zlib error: incorrect data check` during the first pass and caches the image; both PNG and text exports then return success without a repair report. Both exports reject this same fixture on HEAD. This silently accepts a failed stream read, contrary to R7.4 and the retained C11.8 export requirement; the new content-stream checksum test does not cover cached image streams. Retain and classify failures from the first pass instead of assuming every warning there is font substitution, and add a regression using this image filter chain. Windows comparison evidence: `.work/R7.4-r1-compare.log`.
|
||||
@@ -0,0 +1,3 @@
|
||||
FAIL
|
||||
|
||||
1. crates/ely-pdf-engine/shim/ely_mupdf.c:86 — Flushing before installing the warning collector discards genuine damage found by an earlier unwatched text/search read. Reproduction: a PDF with a sound cross-reference table and two distinct 4×4 RGB image objects with `/Filter [/FlateDecode /ASCIIHexDecode]`, each containing zlib-compressed `ff0000` repeated 16 times followed by `>`, with its checksum replaced by four zero bytes. Call `text` or `search` before rendering: MuPDF caches the images and leaves a repeated checksum warning pending; the new flush discards it, so rendering returns `damaged = false` and no repair report. Text extraction followed by either PNG or text export also succeeds. HEAD reports damage and rejects those exports. A single RGB image with `/Mask [null null null null null null]` reproduces the same loss; after the text read, even `check_pictures` returns false, removing the overwrite protection required by PDF-14. Capture and classify warnings during the earlier reads and retain damage for the affected document, excluding only the harmless font notice and its repeats; add regressions that read/search damaged images before rendering, exporting, or checking them. Windows comparison evidence: `.work/R7.4-r2-compare.log`.
|
||||
@@ -0,0 +1,3 @@
|
||||
FAIL
|
||||
|
||||
1. crates/ely-pdf-engine/shim/ely_mupdf.c:89 — Seeding from only the last warning still loses genuine damage when an unwatched read reaches fonts after a damaged image. Reproduction: combine the new bad-mask fixture (4×4 RGB, `/Mask [null null null null null null]`, `/ASCIIHexDecode`, `ff0000` repeated 16 times followed by `>`) with the two separate unembedded SimSun fonts from `an_unembedded_font_is_no_damage`; draw the image before the two text runs. On fresh workers, call `text()` or `search()` before rendering, exporting, or checking pictures. The mask warning occurs six times, but the first font notice flushes those warnings outside the collector; only the font repeat remains pending. The new filter ignores that repeat, and the cached image raises no further warning: rendering returns `damaged = false`, the repair report is `None`, PNG and text exports succeed, and `check_pictures` returns false. HEAD detects damage and rejects both exports on this same fixture. This removes the damaged original's overwrite protection required by R7.4 and PDF-14. Capture and classify warnings during text/search reads and retain genuine damage for the document; add a regression combining the bad image and font notices in both drawing orders. Windows comparison and exact reproduction: `.work/R7.4-r3-compare.log`.
|
||||
Reference in new issue
Block a user