Repository navigation
Pr 461 - #465
Closed
PeterStaar-IBM wants to merge 3 commits into
Closed
Pr 461#465PeterStaar-IBM wants to merge 3 commits into
PeterStaar-IBM wants to merge 3 commits into
Conversation
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>
Contributor
|
✅ DCO Check Passed Thanks @PeterStaar-IBM, all your commits are properly signed off. 🎉 |
Contributor
|
|
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.
Evidence:
Ground truth changes:
Checklist:
main, no merge commits