fix(pdf): debug overlay hardening - neutral DocumentDebugOptions + top-most label post-pass#165
Merged
Merged
Conversation
…-most label post-pass Review follow-ups on the v1.8 debug overlay: (1) PdfDebugOptions moves to the backend-neutral document.output as DocumentDebugOptions, following the established neutral-output-options pattern so future fixed-layout backends reuse it; (2) node labels paint as one deterministic post-pass over the owner-bounds map after all content - badges can no longer be overdrawn by children or higher layers, the per-fragment dedup set and its key churn are gone, and the badge font is constructed per render pass (the watermark/header-footer pattern) eliminating the shared static PDType1Font race; (3) label text degrades through the shared GlyphFallbackLogger so WinAnsi accents like e-acute survive; (4) badge X is clamped to the page box; (5) GraphCompose.DocumentBuilder drops its boolean+options field pair for one DocumentDebugOptions field - guideLines()/debug() now follow last-write-wins on all three surfaces and debug(none()) reliably disables everything; (6) corner-badge prose corrected in Javadoc/example/CHANGELOG. 17 tests across the overlay suite incl. new e-acute survival, builder-semantics, and split-owner-per-page cases.
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.
What
Review follow-ups on the v1.8 debug overlay (#163), findings 3–8 of the post-merge review:
PdfDebugOptions→DocumentDebugOptionsindocument.output, following the neutral-output-options pattern (DocumentWatermark,DocumentMetadata, …) — future fixed-layout backends reuse the same carrier instead of growing per-format duplicates. Unreleased API, so the rename is free (japicmp baseline is v1.7.0).path#pagekey churn, and the widened render signatures are gone; iteration is page/path-sorted for byte-stable output.PDType1Fontwhose PDFBox encode cache is not safe under the documented concurrent-render contract.GlyphFallbackLogger— WinAnsi accents likeésurvive, anything else becomes?with aglyph.missinglog (previously hand-rolled ASCII mangledé/–/©).FULL_PATHlabel on a narrow right-edge node no longer draws off-page.GraphCompose.DocumentBuilderdrops its boolean+options field pair for oneDocumentDebugOptionsfield:guideLines()/debug()follow last-write-wins on all three surfaces anddebug(none())reliably disables everything (previously the builder OR-merged and could not turn guides off).Verification
é-survival, builder last-write-wins (both call orders), and split-owner-labelled-on-every-page cases; existing extraction/byte-identity/visual tests green.assets/readme/examples/debug-overlay.pdf; text-extraction order independently confirms the post-pass (all labels extract after content)../mvnw verify -pl .— 1243 tests, 0 failures, BUILD SUCCESS.