Repository navigation
Diff loaded web font faces between the two sides - #92
Merged
Merged
Conversation
Each shot now records the @font-face/FontFace faces it requested (loaded,
or still loading at the 5s fonts.ready timeout). Faces only one side has
show under the row as fonts -"Inter 600" +"X", in report.html, in
results.json as fonts { added, removed }, and in findings when they repeat
on differing routes. System fallbacks are invisible to document.fonts and
are not covered.
Fixes #50
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
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
Each shot now records the web font faces it requested, and faces only one side has are reported:
fonts -"Inter 600" +"Roboto"underfailed(union over the row's widths)fonts …beside the failed-assets line"fonts": { "added": [], "removed": ["Inter 600"] }.addedis left only,removedis right only, same astext. Left out when both sides match.findings::fonts -"Inter 600"when it repeats on 2+ differing routes. Clean shots are skipped, so an all-clean run never lists font findings.A face's name is family plus weight, style and stretch, with
normal/400/100%dropped andboldmapped to700. Surrounding quotes are stripped from the family, sincenew FontFace("My Face")reports"My Face"where the same@font-facereportsMy Face. A failed bold face now readsfont X 700, which matches the docs' existingfont Inter 700example.Why
A side that loads a different face (a dropped weight, a renamed family) is easy to miss in the pixels and hard to trace back from a
domproperty. Naming the face points to the cause directly. Fixes #50.Scope and choices
@font-faceandFontFace). System fallbacks never appear indocument.fonts, so the issue's+"Arial"can't be produced from there. That would need CDPCSS.getPlatformFontsForNodeper text node. The docs say this.loadingcounts as requested. Navigation usesdomcontentloadedand thefonts.readywait is capped at 5s, so a slow face can still be on the wire when it's read. Counting it as missing would give a flaky-.--rerun-failedbehaviour is unchanged.How tested
fonts. Both sides useshared/blank.ttf, a 576-byte glyph-less TTF that draws nothing, and only the right also declares a 600 face for theh1. The visual test checks/fontsreports{ added: [], removed: ["Blank 600"] }and the row-"Blank 600". It also checks that the sharedBlankface and/broken-asset's failingGoneface (present on both sides) produce nofonts.pixelFindings: a repeated face on differing routes is a finding, and on clean routes it isn't.src/reverted, the visual test and the first unit test fail. They pass with the change.blank.ttfwas generated with fontTools (.notdefonly, empty cmap), so it carries no licence. The fixture README says so.npm run typecheck,lint,format:check,npm test(340 pass) andnpm run test:visual(348 pass) all pass locally.🤖 Generated with Claude Code