2 KiB
2 KiB
| name | description |
|---|---|
| custom-font-tap-project | Use when working in this repository, when the user asks about fonts, Homebrew formulae, the font tap, adding fonts, or the folder structure in font_files or Formula. Describes a Homebrew tap for custom fonts and the scripts that organize font folders and generate formulae. |
Custom Font Tap — Project context
Canonical reference: read PROJECT.md at the repo root.
What this repo is
- A Homebrew tap for a personal font collection. Users run
brew tap genet-godzilla/fonts ...thenbrew install font-<name>. - Fonts live in
font_files/font-<name>/with exactly four subdirectories:ttf/,otf/,web/,other_files/.
Rules
- Do not edit
Formula/*.rbby hand. They are generated by.fontfoldercleanup/create_homebrew_formula.py. - All font folders must use the
font-prefix. Only.ttfin ttf/,.otfin otf/, web fonts (woff, woff2, eot, svg) in web/, everything else in other_files/. - To add a font: run
uv run add-font <path_or_name>(or addfont_files/font-<name>/, runcleanup_font_folders.pythencreate_homebrew_formula.py). Validate withuv run pytest tests/.
Scripts and CLI
- add-font —
uv run add-font <path_or_name>: add/update a font, runs cleanup + formula generator + tests. Optional:uv tool install .for globaladd-font. - cleanup_font_folders.py (
.fontfoldercleanup/) — Organizes font folders into ttf/, otf/, web/, other_files/. Run with--path <dir>. - create_homebrew_formula.py (
.fontfoldercleanup/) — GeneratesFormula/font-<name>.rbfor everyfont-*folder infont_files/. - tests/ —
uv run pytest tests/validates every font (structure, formula exists, formula content).
Quick commands (from repo root)
uv run add-font <path_or_name> # add or update a font
uv run pytest tests/ # run test suite
python3 .fontfoldercleanup/cleanup_font_folders.py --path font_files
python3 .fontfoldercleanup/create_homebrew_formula.py