mirror of
https://github.com/storytold/font-preview-service.git
synced 2026-11-19 14:00:45 +01:00
- Sample subsets are at /v1/faces/{sha256}/{inst}/sample-{h}.woff2, where h is the
first 12 hex characters of the sha256 of the face's sample text. sync stores h per
face in faces.json; a stale h gets 404 so clients fall back to u/{codepoints}.
Shared vectors for h in tests/data/preview-vectors.json.
- The face cache is bounded by FACE_CACHE_MB (default 256) as well as by count and
serves the subsetter only; /v1/files streams from disk.
- Brotli downloads have their own compression slot, their own cache
(FILES_BR_CACHE_MB, default 64) and spend the client's on-demand tokens; without
either the file goes out uncompressed.
- A cancelled wait for a subsetting slot leaves the queue.
- Response-cache keys carry the generation; cached failures expire after 5 minutes.
- /readyz answers 503 once shutdown starts; a failed signal-handler install no
longer stops the server.
- A full rate-limit map of fresh buckets evicts its oldest quarter.
- Face URLs containing % get 400; a 304 carries no Content-Encoding.