shots: app titles get the weights the templates use (variable axis, used range or static weights; font-weight warning), palette.bg as one colour or a CSS gradient string (validated; contrast guard in shots check), photo backgrounds (palette.image, shots.feature.background) with overlay and cover crop

This commit is contained in:
CRTkafa 2026-10-20 13:37:37 +07:00
parent 2ba8278ab7
commit 3a11682a37
21 changed files with 713 additions and 44 deletions

View file

@ -170,6 +170,20 @@ the icon, feature graphic and phone screenshots and prints `tablet screenshots:
`{ bg, glow, ink, shadow }`), frames (one front phone + optional back phones with x / dy / scale / rotate), badge
slots (y, side, icon, hot, stars). Fonts default to Paytone One + Montserrat (game) or Inter (app): all cover
Latin Extended and Vietnamese.
**Custom palette bg:** `['#a', '#b', '#c']` (or two stops), one colour `'#15171C'` (flat) or a CSS gradient string
`'linear-gradient(160deg, #0b1736, #1d4ed8)'` (passed through). Anything else fails config validation and render
("palette.bg must be a colour, a gradient or an array of 2-3 colours"); a dark bg needs a light `ink`.
**Photo background (app style):** `palette.image: 'store/art/hero.png'` (+ `overlay`, 0-0.9, default 0.45: a flat
dark layer that keeps white ink legible) on a scene palette, or `shots.feature.background: 'store/art/hero.png' |
{ image, overlay }` for the Play feature graphic only. The image is cropped to cover; `shots check` errors on a
missing file and warns when it is smaller than the output (1024 x 500 for the feature graphic, the biggest
screenshot size for scenes). Play's feature graphic may be a branded photo (keep text out of it apart from the
name); the App Store has no feature graphic, but the same art can be the Header and Search Results asset below.
**Title weight:** `shots fonts` downloads the weights the templates use (app: 700 / 750 titles, 400-700 body): the
full `wght` axis of a variable Google family, else the range the templates use, else the static weights one by one.
A family that lacks a weight is drawn at the nearest one (never faked bolder), so `shots fonts` warns, and
`shots check` warns per image when the title's weight was not served (`font-weight`). A local font file declares
its weight with `{ family, file, weight }`; a static file needs it.
6. **Render.** (`--concurrency N`, default min(4, cores / 2) pages) `storebound shots render --lang en` first, review `store/renders/en/sheet.png` (contact sheet, sizes
packed into a grid), then
all languages in the background: `storebound shots render > .storebound/render.log 2>&1 &`.
@ -177,7 +191,9 @@ the icon, feature graphic and phone screenshots and prints `tablet screenshots:
8. **Check.** `storebound shots check` (read-only, exit 1 on errors): pixel sizes (Apple: a listed size, portrait or
landscape; Play screenshots 320-3840 px at most 2:1; feature graphic exactly 1024 x 500), alpha, Play JPEG /
24-bit PNG and 8 MB, counts per set (Apple 1-10, Play 2-8), text overflow flags (warnings), glyphs drawn by an
automatic font fallback or a system font (errors; `shots render` measures every character in the page), a device
automatic font fallback or a system font (errors; `shots render` measures every character in the page), a title
drawn at another weight than asked (`font-weight`, warning), title ink with low contrast against the pixels behind
it (`contrast`, under 3:1, warning: catches white on white), photo backgrounds missing or too small, a device
frame cut off by the feature graphic's edge (error unless `shots.feature.fit: 'bleed'`; the default 'contain' fits
the rotated phone with a 24 px margin, `scale` 0.5-1.5 resizes it) or a screenshot's front device running off a
side or the top (warning; the bottom bleed is the design). `--variants` also checks