doxa-maps/library/scripts/posters
doxa-maps-88655c70 dd14b5fe76
Some checks are pending
build-gate / build (push) Waiting to run
feat(packet): five more languages, and right-to-left support for Arabic
The packet now ships in 9 of the app's 11 locales: en es fr pt de it ro ru ar.
Each carries all 21 translatable keys — page furniture, the twelve prayer points
with sub-headings, the eleven rhythms, both Metacamp attributions, the privacy
note. point4_passage (Mark 5:1-20 in full) stays omitted in every non-en block
and falls back to the licensed English WEB text with its credit, for the reason
already recorded: translating scripture here would put unlicensed, unverified
Bible text into a printed prayer packet.

RTL IS NOW REAL, not assumed. The renderer emits dir on <html> from an RTL
locale set. Without it an Arabic packet renders readable glyphs LEFT-aligned —
which looks like a styling quirk rather than a bug, and no assertion noticed.

★ TWO BIDI FINDINGS, both from reading the render rather than the code:

1. Scripture references are LTR runs inside RTL paragraphs, and the bidi
   algorithm REORDERS a run that starts with a digit: "1 Peter 5:6-11" rendered
   as "Peter 5:6-11 1". Each reference is now dir="ltr" + unicode-bidi:isolate.
2. With isolation, the reference LIST reads right-to-left on an RTL page (first
   item rightmost). That is correct for an RTL reader, not a defect — recorded
   in _meta so nobody "fixes" it. English source order is unchanged, asserted.

★ HINDI IS DELIBERATELY NOT ADDED. Rendering each script at 48px and READING THE
PIXELS: Latin, Cyrillic, Arabic and CJK all shape correctly in the packet's
Georgia/serif stack; DEVANAGARI RENDERS AS TOFU BOXES, because this box has zero
Devanagari fonts (fc-list). A hi block would ship a page of empty rectangles. It
is blocked on vendoring a Devanagari font into public/assets/fonts, which is its
own piece of work.

⚠ THE MEASUREMENT THAT LIED. My first test compared rendered text advance against
a missing-font baseline and reported ar and zh BROKEN and hi FINE — the exact
opposite of the truth, because Devanagari tofu boxes happen to match real glyph
advance. One screenshot settled in a glance what two rounds of clever
arithmetic got backwards. Recorded in _meta.

Verified at the rendered layer in all nine languages: 8 sheets -> 8 letter
portrait pages, 95 people cards, 12 wheel segments, map painted, zero
overflowing sheets, 19 strings differing from English per locale. The Arabic
prayer-points page was read as a picture, not just asserted on.
2026-09-24 03:50:35 +00:00
..
data feat(posters): capitals and major cities on the country maps 2026-09-24 02:21:03 +00:00
snapshots Complete app-profiles->plugin-designs sweep across comments/docs; build green; layouts kept at root (load-bearing) 2026-09-17 18:18:19 +00:00
build-gallery.mjs doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
build-hd-gallery.mjs doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
emit-countries.mjs Complete app-profiles->plugin-designs sweep across comments/docs; build green; layouts kept at root (load-bearing) 2026-09-17 18:18:19 +00:00
export-public.mjs doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
generate.mjs fix(posters): measure the full-version header instead of guessing 460 2026-09-24 03:31:01 +00:00
make-previews.py Complete app-profiles->plugin-designs sweep across comments/docs; build green; layouts kept at root (load-bearing) 2026-09-17 18:18:19 +00:00
osm-basemap.mjs Prepare repo to the vision: BLUF vision-cast README, library warning, SRI injection, term scrub 2026-09-15 22:58:19 +00:00
packet-strings.json feat(packet): five more languages, and right-to-left support for Arabic 2026-09-24 03:50:35 +00:00
packet.mjs feat(upg-100): print a prayer packet from the map legend 2026-09-24 02:43:49 +00:00
poster-regions.mjs doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
publish-html.mjs fix(posters): one bad zone no longer costs the other 28 2026-09-24 03:20:50 +00:00
README.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
serve-persist.sh doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
serve.sh doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
shoot.mjs doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
verify-posters.mjs Prepare repo to the vision: BLUF vision-cast README, library warning, SRI injection, term scrub 2026-09-15 22:58:19 +00:00

library/scripts/posters/ — UPG-100 poster generator

Renders one 3ft × 3ft print poster per zone (28 today) for the my-upg-100-list profile, from the profile's own data. It ships inside the repo alongside that data on purpose — reaching for the data via an env var once silently rendered stale posters (Nepal, Bangladesh, Bhutan vanished).

  bun run posters  ->  posters:shoot  ->  (WebP previews)  ->  bun run build
   HTML per zone       PNG @3000²        assets/previews/     app shows them
  • generate.mjs is the template; shoot.mjs screenshots to PNG (Firefox only — privacy-first policy).
  • A template change is not visible in the app until previews are regenerated and the app rebuilt.
  • Exported PNGs go to a sibling folder (../../../upg-100-posters/), never public/ — Capacitor packages public/ wholesale.
  • snapshots/ holds frozen template versions (v5 is the approved current); each has its own README.

Full reference — files, env vars, gotchas, measurement discipline: ../../../documentation/architecture/poster-generation.md.