Update documentation and scripts for font addition process; introduce uv run add-font CLI command for streamlined font management. Enhance formula generation with improved class name formatting and validation steps. Remove outdated font formula files.

This commit is contained in:
Matt Troutman 2026-02-09 22:04:01 -06:00
parent 69d8156b09
commit 56b64d0b34
No known key found for this signature in database
266 changed files with 1187 additions and 8145 deletions

View file

@ -12,6 +12,6 @@ applyTo: "**"
## Rules
- Do **not** edit `Formula/*.rb` by hand. They are generated by `.fontfoldercleanup/create_homebrew_formula.py`.
- To add a font: add folder `font_files/font-<name>/`, run `cleanup_font_folders.py` then `create_homebrew_formula.py`.
- Scripts are Python 3 in `.fontfoldercleanup/`: `cleanup_font_folders.py`, `create_homebrew_formula.py`.
- To add a font: run `uv run add-font <path_or_name>` (or add folder `font_files/font-<name>/`, run `cleanup_font_folders.py` then `create_homebrew_formula.py`). Validate with `uv run pytest tests/`.
- Scripts: Python 3 in `.fontfoldercleanup/` (cleanup_font_folders.py, create_homebrew_formula.py). CLI: `uv run add-font`. Tests: `uv run pytest tests/`.
- All font folders must use the `font-` prefix; only `.ttf` in ttf/, `.otf` in otf/, web fonts in web/, everything else in other_files/.

33
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Run tests
run: uv run pytest tests/ -v --tb=short
brew-audit:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Audit formulae
run: |
for f in Formula/font-*.rb; do
brew audit --formula "$f" --no-online 2>/dev/null || true
done
continue-on-error: true