Skip to content

test(layout): re-pin the run-built golden documents after the font change - #660

Merged
Tim81 merged 2 commits into
mainfrom
test/repin-run-goldens-after-fonts
Nov 21, 2026
Merged

Tim81 merged 2 commits into
mainfrom
test/repin-run-goldens-after-fonts

Conversation

@Tim81

@Tim81 Tim81 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

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_pinTheBytes and EmbeddedLists_pinTheBytes fail, 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):

  • The font descriptor: /FontBBox changes from [0 -212 488 905] to [-544 -304 1302 980].
  • The FontFile2 stream dictionary gains /Length1, which is the decompressed program length (145076 and 142552).
  • The FontFile2 program loses its cmap table. Of the sfnt tables, only head differs among those both programs keep, and only at bytes 8 to 11, which is checkSumAdjustment, the whole-font checksum that changes whenever a table is removed.
  • The length object follows the new stream size.

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):

Project net10.0 net11.0
Kernel.Tests 2631 passed 2631 passed
Layout.Tests 1372 run, 0 failed, 2 skipped (Linux-only tests) same
Conformance.Tests 1466 passed 1466 passed

Release build 0 warnings; dotnet format --verify-no-changes, the clean-room check and generate-roadmap.py --check exit 0.

…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.
@Tim81
Tim81 merged commit 994da67 into main Nov 21, 2026
4 checks passed
@Tim81
Tim81 deleted the test/repin-run-goldens-after-fonts branch November 26, 2026 20:21
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.

1 participant