Repository navigation
test(layout): re-pin the run-built golden documents after the font change - #660
Merged
Merged
Conversation
…ogram change The two embedded-font pins were recorded before every embedded TrueType font started carrying a head-table FontBBox, no cmap table in a CIDFont glyf program, and /Length1 on FontFile2. A qpdf object diff of both documents shows only those changes.
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.
Two PRs merged independently. The one that builds Heading and ListItem from runs added whole-file hash pins for two documents that embed a TrueType font. The font-program PR then changed the output of every embedded TrueType font on purpose. On main,
RunsHeadingListItemGoldenTests.EmbeddedHeadings_pinTheBytesandEmbeddedLists_pinTheBytesfail, on net10.0 and net11.0 alike. This re-pins those two values and nothing else.Why the bytes moved
I built both documents on the commit before the font change and on main, saved them, and compared them after
qpdf --qdf --object-streams=disable. The object numbering is identical (27 objects in the headings document, 38 in the lists document). In each document exactly three objects differ (the font descriptor, the FontFile2 stream and the indirect object holding its length):/FontBBoxchanges from[0 -212 488 905]to[-544 -304 1302 980]./Length1, which is the decompressed program length (145076 and 142552).cmaptable. Of the sfnt tables, onlyheaddiffers among those both programs keep, and only at bytes 8 to 11, which ischeckSumAdjustment, the whole-font checksum that changes whenever a table is removed.Outside those objects, only the second element of the trailer
/ID(derived from the content) and the xref offsets differ. No page content, structure tree, ToUnicode, XMP or other object differs.Change
Two pins in
tests/VellumPdf.Layout.Tests/RunsHeadingListItemGoldenTests.cs, with a comment beside them saying they include the font program change. The hash already inflates every Flate stream and folds the ToUnicode line ends, so the test keeps one value for both platforms. I ran it on Windows only; the Linux run is CI's.I searched the other test projects for hash pins over documents that use an embedded font (files that mention SHA256, HashData or Sha256 together with TrueType, DejaVu, Liberation, SourceSans or FontRef). Nothing else moved, so no other pin changes.
Gates
Release, with the oracle gates required (REQUIRE_ORACLES, REQUIRE_VERAPDF, veraPDF 1.30.4, qpdf 12.4.2, poppler):
Release build 0 warnings;
dotnet format --verify-no-changes, the clean-room check andgenerate-roadmap.py --checkexit 0.