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

42
tests/conftest.py Normal file
View file

@ -0,0 +1,42 @@
"""Shared fixtures and repo paths for font tap tests."""
from pathlib import Path
import pytest
# Repo root: directory containing font_files/ and Formula/
REPO_ROOT = Path(__file__).resolve().parent.parent
FONT_FILES_DIR = REPO_ROOT / "font_files"
FORMULA_DIR = REPO_ROOT / "Formula"
REQUIRED_SUBDIRS = ("ttf", "otf", "web", "other_files")
WEB_EXTENSIONS = (".woff", ".woff2", ".eot", ".svg")
def get_font_dir_names():
"""Return sorted list of font-* directory names in font_files/ (single source of truth)."""
if not FONT_FILES_DIR.exists():
return []
return sorted(
d.name for d in FONT_FILES_DIR.iterdir() if d.is_dir() and d.name.startswith("font-")
)
@pytest.fixture(scope="session")
def repo_root():
return REPO_ROOT
@pytest.fixture(scope="session")
def font_dir_names():
"""All font folder names (font-<name>) from font_files/."""
names = get_font_dir_names()
assert names, "No font-* directories found in font_files/"
return names
@pytest.fixture(scope="session")
def formula_paths():
"""All Formula/font-*.rb paths that exist."""
if not FORMULA_DIR.exists():
return []
return sorted(FORMULA_DIR.glob("font-*.rb"))