You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested this PR on the Windows 10 environment where #106 was originally reproduced.
Environment:
Python 3.11.9
PyTorch 2.5.1+cu121
CUDA available on NVIDIA GeForce GTX 960M
docling and both Rust extensions installed
With PR #107 checked out, the original FPDF Unicode/Helvetica failures are gone. The full smoke-test module now gets further and reports 2 passed, 1 failed, 1 skipped instead of the original 1 passed, 2 failed, 1 skipped.
The remaining failure is in test_docling_math_pipeline_with_mixed_pdfs at:
assert greek_row["greek_badness_score"] > 60
E assert 55.556 > 60
That looks separate from the font-selection bug. I also tried Segoe UI Symbol (seguisym.ttf) locally because Arial warns that it is missing the subscript-zero glyph. Segoe UI Symbol removes that missing-glyph warning, but the greek_badness_score remains exactly 55.556, so changing the Windows fallback font does not resolve the remaining assertion.
So from my Windows reproduction, this PR does fix the original issue #106, while exposing a separate environment-sensitive smoke-test failure further downstream.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #106.
The smoke-test PDF helper used a Linux-only DejaVu Sans path:
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttfOn Windows, that path does not exist, causing the test helper to fall back to Helvetica, which cannot reliably render Greek Unicode text.
This change:
uni=TrueFPDF usagetests/test_pipeline_smoke.pyTesting
git diff --checkpassesC:\Windows\Fonts\arial.ttfon Windows_write_pdf()helper successfully generates a PDF containing Greek text (Καλημέρα κόσμε)doclingandglossapi_rs_cleanerare not installed in the local environment