fix(screenshot-change): render design fonts and capture at 2x - #210
Merged
Merged
Conversation
A Linux capture host has neither `ui-monospace` nor `system-ui`, so fontconfig substituted DejaVu and captures looked nothing like the app; the harness now fronts vendored JetBrains Mono and Inter in `--mono`/`--sans` before the first paint. `deviceScaleFactor` was pinned to 1, halving the density of a HiDPI display. `newPage` now captures at 2x by default and exposes `scale`; video stays at 1x since 2x mp4 mostly wastes bytes.
pavelzw
approved these changes
Sep 18, 2026
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.
Screenshots from the skill looked wrong on this machine: the text rendered in DejaVu and the image looked pixelated. Both causes were in the harness.
newPagepinneddeviceScaleFactor: 1, so a capture carried half the density of a HiDPI display. It now captures at 2x by default and takes ascaleargument. Video stays at 1x, since 2x mp4 mostly wastes bytes.The client's type stack names
ui-monospaceandsystem-ui, both macOS-only. A Linux host resolves them to DejaVu, so a capture no longer looked like the app.newPageandnewVideoPagenow inject vendored JetBrains Mono and Inter through--mono/--sansbefore the first paint, then wait ondocument.fonts.ready. The fonts are devDependencies of the skill, so the app's install and CI stay untouched; without them the harness falls back to the host fonts.Screenshot
Before is a 1x capture upscaled 2x for comparison; after is the new 2x capture with the vendored fonts.