Skip to content

Pr 461 - #465

Closed
PeterStaar-IBM wants to merge 3 commits into
mainfrom
pr-461
Closed

Pr 461#465
PeterStaar-IBM wants to merge 3 commits into
mainfrom
pr-461

Conversation

@PeterStaar-IBM

Copy link
Copy Markdown
Member

Evidence:

Ground truth changes:

Checklist:

  • One topic per pull request, rebased on main, no merge commits
  • Superseded pull requests closed and linked
  • Regression dataset documents and pages named, or a dataset pull request that adds a new document
  • Before/after evidence for each cited page
  • Rendering only: pypdfium2 comparison images, corpus-wide metrics table, and an enforced image regression test
  • Blend2D only: link to the upstream report
  • Changes to existing ground truth listed with the reason for each page

usercjr and others added 3 commits November 13, 2026 11:31
Without /Widths, the advance and glyph bbox of a non-embedded standard
font come from its AFM, which numbers glyphs in the font's built-in
(Standard) encoding. The raw character code was looked up directly, so
a font declaring /WinAnsiEncoding got the metrics of whatever Standard
has at that code: `©` (0xA9) the width of `quotesingle`, `é` (0xE9)
that of `Oslash`, the apostrophe (0x27) that of `quoteright`. Codes
with no Standard glyph, like `í` (0xED), fell back to 500.

#370 already records the width of unencoded (`C -1`) glyphs by name.
Record their bbox by name too, add name-based width and bbox accessors
to base_font, and resolve the code through get_glyph_name() (declared
/Encoding and /Differences) before the code-based lookup in
get_width(), nonzero_fallback_width() and has_char_bbox()/
get_char_bbox(). Fonts without an explicit encoding are unchanged.

Add 7413869934284023443-1.pdf p2 to the cited-page tests: its
Helvetica-Bold maps 193 to Aacute through /Differences, and the heading's
"Á" was drawn with the width of `grave`.

Fixes #403.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: usercjr <92197541+usercjr@users.noreply.github.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @PeterStaar-IBM, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

⚠️ The sha of the head commit of this PR conflicts with #461. Mergify cannot evaluate rules on this PR. Once #461 is merged or closed, Mergify will resume processing this PR. Until then, #461 reports the Mergify Merge Protections status of this commit, which passes only when the merge protections of every open PR on it pass, this PR's included. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants