Repository navigation
Conversation
Skia/PDF names Type 3 glyphs with printf("g%X", gid), so /g15C or /gA1
carry hexadecimal digits and escaped the decimal-only glyph-index
pattern. Such names then leaked into the extracted text as 'g15C'
instead of the GLYPH<name:...> marker (the docling-project#238 / docling-project#302 failure class).
Widen the character class to [0-9A-Fa-f]; regex_match still requires a
full match, so AGL names such as gbreve or gcaron are unaffected.
Signed-off-by: Jeff Witt <1848307+wittjeff@users.noreply.github.com>
Contributor
|
✅ DCO Check Passed Thanks @wittjeff, all your commits are properly signed off. 🎉 |
Contributor
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/
|
Points HF_DATASET_REVISION at the head of docling-project/regression-dataset-for-docling-parse PR docling-project#7, which wraps the bare G<hex> names on two pages in GLYPH<name:...> markers. Re-point at the merge commit once that PR lands. Signed-off-by: Jeff Witt <1848307+wittjeff@users.noreply.github.com>
PeterStaar-IBM
self-requested a review
October 7, 2026 05:38
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Skia/PDF (Chrome print-to-PDF, Notion exports, Flutter) names Type 3 glyphs with
characterName.printf("g%X", gID)(SkPDFFont.cpp:758), so names such as/g15Cand/gA1carry hexadecimal digits.re_gidonly accepted\d+, so those names fell through to the "unknown glyph-name" branch and leaked into the extracted text asg15C, the failure class of #238 and #302.Before this change, with
/Differences [65 /<name>], ToUnicode<0000>and no/ActualText:GLYPH<name:…>/ U+FFFD, as designedFound while tracing opendataloader-project/opendataloader-pdf#767: Skia maps Inter's cap-height hyphen alternate to
<0000>in ToUnicode. docling-parse recovers that file through the/ActualText (-)span, so the leak only shows when a producer omits ActualText (older Skia) or when the alternate is not wrapped.std::regex_matchrequires a full match, so AGL names such asgbreveandgcaronstill do not match the widened class.Regression corpus
test_reference_documents_from_filenamespasses on upstreammainand fails on this branch for two pages, both intentional: the pages mix fonts whose glyph names areG<hex>with no ToUnicode entry, and the stored ground truth already contains the inconsistency this fixes (GLYPH<name:G27> GLYPH<name:G29> GDB GLYPH<name:G67>on one line).Every change is a bare name wrapped into
GLYPH<name:...>; no coordinate, font-key or cell-count differences, and every other document in the corpus is unchanged. The regeneratedjson.gz,char.txt,word.txtandline.txtfor both pages are in regression-dataset PR #7.HF_DATASET_REVISIONis pinned to that PR's head commit4103ae9bso the regression lane runs against it; re-point it at the merge commit when the dataset PR lands.Checklist: