shots check: ligatures no longer read as system-font glyphs (probe spans shaped as one run); --help on every command and group, unknown flags rejected before anything runs
Root cause: the per-character font probes were inline spans side by side, so Chrome shaped f + i into the fi ligature across them and the lone i probe reported no glyph of ours. Each probe is now its own block. The Google Fonts text= subsets keep the GSUB ligatures; regression test with a real Montserrat text= subset. --help / -h prints the command's usage and exits 0 before any config, render or network; unknown flags exit 2 with the usage (cli/data/flags.json from tools/gen-flags.ts). Command tables moved to cli/commands.ts; ads apple reachable again; shots render --scenes rejects unknown ids at once.
This commit is contained in:
parent
cde9424ce3
commit
ee427553bb
12 changed files with 1625 additions and 99 deletions
|
|
@ -252,7 +252,9 @@ export const COLLECT_TEXT = `(ours) => {
|
|||
box.style.cssText = 'position:absolute;left:-20000px;top:0;white-space:pre';
|
||||
for (const p of probes) {
|
||||
const s = document.createElement('span');
|
||||
s.style.cssText = 'font-size:32px;font-family:"' + p.face.replace(/"/g, '') + '";font-weight:' + p.weight + ';font-style:' + p.style;
|
||||
// display:block: one character per line box. Inline probe spans side by side are shaped as one run, so "f" + "i"
|
||||
// became the fi ligature, the "i" span reported no glyph of ours and was blamed on a system font.
|
||||
s.style.cssText = 'display:block;font-size:32px;font-family:"' + p.face.replace(/"/g, '') + '";font-weight:' + p.weight + ';font-style:' + p.style;
|
||||
s.textContent = p.ch;
|
||||
box.append(s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Store screenshots + Play feature graphic at exact pixel sizes, from raw app or game frames and per-language copy.
|
||||
// storebound shots render [--lang en,tr] [--size ios69,play,feature] [--scenes 1,3] [--variant b | --variants]
|
||||
// storebound shots render [--lang en,tr] [--size ios69,play,feature] [--scenes hero,battle] [--variant b | --variants]
|
||||
// [--no-sheet] [--port 8792] [--concurrency N] [--dry]
|
||||
// Out: <shots.out>/<lang>/<size>/NN.png (24-bit RGB: Play rejects alpha / palette PNGs), <lang>/feature/1024x500.png,
|
||||
// <lang>/sheet.png (contact sheet of every size packed into a grid, for a quick review) and <shots.out>/report.json (text overflow flags
|
||||
|
|
@ -48,6 +48,10 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
if (problems.length) throw new Error(`shots copy${v ? ` (variant ${v})` : ''}:\n ` + problems.join('\n '));
|
||||
jobs.set(v ?? '', { scenes, copy });
|
||||
}
|
||||
for (const [v, job] of jobs) {
|
||||
const bad = a.list('scenes').filter(id => !job.scenes.some(s => s.id === id));
|
||||
if (bad.length) throw new Error(`--scenes: unknown scene id${bad.length > 1 ? 's' : ''} ${bad.join(', ')}${v ? ` (variant ${v})` : ''}; scene ids: ${job.scenes.map(s => s.id).join(', ')}`);
|
||||
}
|
||||
const framesDir = resolve(shots.frames), outDir = resolve(shots.out);
|
||||
if (a.has('dry')) {
|
||||
let n = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue