Repository navigation
Conversation
docling-parse draws non-embedded fonts with host fonts. A host with no match leaves the page image blank, and layout can drop the text. Warn once per document and document the font packages. Signed-off-by: Yun. <fangyun1008@gmail.com>
|
✅ DCO Check Passed Thanks @Yun-0000, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The PR adds a one-time warning in the Topic labels added: CI safety: no concern found. A maintainer must still approve CI. 1 related pull request(s) in the same code
The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 3833103aa4. It read the code and did not run it.
Checked the text ink fraction check, the single warning state per document backend, and the test coverage for blank and drawn pages with no issues found.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Checklist:
See #4995.
The default PDF backend paints non-embedded fonts with host fonts. A host with no match leaves the page image blank, so layout and table detection can drop the text, and nothing said so. This does not make the render independent of the host. It warns once per document when visible text cells contain almost no ink, and the installation guide lists the font packages and
DOCLING_PARSE_FALLBACK_FONT.Review evidence:
Before:
get_page_image()on a page whose text cells sit on a blank image logged nothing.After: the same call logs one warning that names
DOCLING_PARSE_FALLBACK_FONT. A second call does not log again. Ink inside the text cells, and a crop, do not warn. A real render oftests/data/pdf/invisible_text_layer.pdfon this host has an ink fraction of 0.25, so it does not warn.Passed:
uv run pytest tests/test_docling_parse_missing_font.pyonmain: 2 failed (test_unpainted_text_warns_once,test_a_crop_does_not_warn_before_the_full_page), 1 passed (test_ink_inside_text_cells_does_not_warn).uv run pytest tests/test_backend_docling_parse.py tests/test_docling_parse_missing_font.py: 37 passed.make validate: passed.Failed:
Not run:
make test. No PDF reference files were regenerated. This host has DejaVu fonts, so the no-font render itself was not reproduced here.