diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e89c3ac --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,22 @@ +# core-fonts — Euro-Office Font Infrastructure + +@../AGENTS.md + +Guidance for Claude Code (and other AI agents) working in **core-fonts** — the font binary asset store. + +## What this repo is +A static, no-build collection of font binaries (`.ttf`/`.otf`/`.ttc`) across 40+ vendor families (Liberation, DejaVu, Droid, Noto, Lohit, …), plus `ASC.ttf` (the Euro-Office Private Use Area font with internal symbols). It contains **no code and no build step** — it is consumed by tooling that lives in other repos. + +## How fonts flow into the build +- **`AllFonts.js` is generated by `core`, not here.** The `core/DesktopEditor/AllFontsGen/` C++ tool parses every font in this repo and emits `AllFonts.js` (metrics + charset maps + fallback chains) into the `sdkjs` source tree. **CRITICAL:** if you add or replace a font binary, `AllFonts.js` must be regenerated in `core` and rebuilt in `sdkjs` — the change is invisible to the editors until then. +- **Production path:** packaging copies this tree to `/var/www/euro-office/documentserver/core-fonts/` (see `build/build_deb.sh`). Tooling resolves fonts from that fixed path — do not restructure the directory layout. +- **Fallback order** is derived from font metadata by `AllFontsGen` at generation time, not from any config file in this repo. + +## Rules +- **Never** edit font binaries by hand — each vendor has its own license file; binary edits void it and corrupt the font. +- **Never** remove `ASC.ttf` — the rendering engine depends on its Private Use Area codepoints. +- **Never** add a font without verifying its license permits free redistribution, and without including the vendor's license file. +- **Never** commit `AllFonts.js` here — it is generated output that belongs to `sdkjs`. + +## Findings & Long-tail +No centralized findings store exists in this repository yet. Document edge cases in code comments or GitHub issues until one is established. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md