| index 8228ddd..7402981 100644 |
| --- a/AGENTS.md |
| +++ b/AGENTS.md |
| @@ -154,14 +154,32 @@ seeded on first sign-in — and comes back out as a PDF. |
| `0008_create_asset_uploads.sql`): one deck, one actor, single use, two |
| hours. A ref alone registers nothing, and no PUT is ever signed for an |
| address something is already served from (spec §2.7, codex 1 and 2). |
| +- **The font library** (`library.go`, `fonts.html`, estilo's `typeface` |
| + package): `/fonts` is a person's own set of fonts, uploaded through |
| + the app (TTF, OTF, WOFF, WOFF2; `typeface.Inspect` reads the family, |
| + weight, italic and whether a face may go in a picture or PDF, as |
| + `Pictures()`). Limits: 10 MiB a file, 16 faces to a family, 32 |
| + families. A name a catalog family or a CSS generic keyword holds gets |
| + a number. Uploads and deletes take `fontMu`, so the limits hold under |
| + two at once. A file lives in the object store under its own hash, and |
| + `typeface.Headers` serves it with private caching. Deck settings |
| + picks a library family (`POST /d/{sqid}/fonts`: `DeckFont` rows and |
| + the `meta.fontFiles` set_meta). Agents can write `meta.fontFiles` but |
| + cannot upload bytes: a ref is served only through a deck that |
| + recorded it **and** lists it (`/d`, `/s`, `/p` `.../fonts/{ref}`; `/d` |
| + also serves a recorded ref to its library owner, so a pick loads |
| + before its set_meta lands). The TrueType parser in `fonts/` reads |
| + untrusted bytes, so every offset and count is bounds-checked. |
| - **The layout engine and thumbnails** (`layout/`, `svg/`, `fonts/`, |
| `thumbs.go`): every slide measured into a paint list with the same |
| embedded Liberation faces the browser sets it in, written as an SVG, |
| and served as `{surface}/slides/{id}.svg` from all four capabilities. |
| A deck stack that names an uploaded family first is set in its static |
| - TrueType faces (`meta.fontFiles` faces marked `pictures`), read from |
| + TrueType faces (`meta.fontFiles` faces marked `pictures`: static TrueType whose |
| + flags allow subsetting), read from |
| the object store (`fontstore.go`) and parsed once per render through |
| - `layout.New`; anything else falls back down the stack, and the export |
| + `layout.New`; anything else (variable, CFF, no subsetting) falls |
| + back down the stack, and the export |
| hands the PDF module those faces renamed to the deck's CSS name |
| (`fonts.Renamed`), because the module matches the name inside a font. |
| The editor strip and the remote are that picture. The presenter |