RootFont v0.3.0-alpha
Pre-release🚀 Welcome to RootFont v0.3.0-alpha (5)
RootFont v0.3.0-alpha is the programming-font release on top of v0.2.0-beta. This build adds a dedicated Programming workspace, a full suitability-scoring pipeline with persisted cache, multi-mode font comparison, 12-language code preview with syntax highlighting, OpenType feature toggles in preview, font activation/install flows, and one-click editor config export. Startup is faster thanks to staged catalog loading and shared font-URL caching, and the test/CI surface is substantially wider. If you picked monospaced fonts by gut feel before, you now have data, side-by-side tools, and copy-paste snippets to back the choice.
✨ Key Features
📂 Font Management & Browsing
Programming workspace module: The sidebar now switches between Library and Programming. Programming mode scopes the catalog to monospaced fonts, defaults sort to programming fit, and exposes Recommended for code / Avoid for code filters alongside the existing All / System / User / Favorites / Recents entries. Managed-by-RootFont filter: Fonts activated or installed through RootFont appear under a new sidebar entry so you can audit what the app is managing. Staged catalog loading with progress UI: FontCatalogService loads basic metadata first (including cached scores), then enriches uncached fonts with feature inspection and metrics in the background. The font list shows a two-phase progress bar — loading fonts / enriching font analysis — and partial results appear before enrichment finishes. FontURLIndex shared cache: CTFontManagerCopyAvailableFontURLs results are cached once in FontURLIndex.shared and invalidated on catalog reload, cutting repeated system font enumeration during load, activation, and filtering. Forgiving row hit targets: Sidebar and font-list rows use expanded contentShape and removed competing tap handlers so the full row width selects reliably. Vertical padding was tuned for easier pointer targeting without changing selection behavior. Programming grade badges in the grid: Monospaced fonts with a computed score show an S / A / B / C / NR grade badge on grid cards so you can scan rankings before opening the preview panel.
💻 Programming Workspace
10-factor suitability scoring: ProgrammingScoreEngine scores monospaced fonts on monospace baseline, glyph disambiguation, ligature support, stylistic flexibility, box drawing, Powerline glyphs, Nerd Font coverage, variable-font support, language coverage, and family weight variety. Output is a 0–100 total plus S / A / B / C / Not Recommended grade. Feature + metrics inspection: FontFeatureInspector reads OpenType features, Powerline / Nerd / box-drawing coverage, stylistic sets, and variable-font axes. FontMetricsProbe measures ASCII advance variance, uniform-width detection, and confusable-pair distances (Il1, O0, rnm, 8B, 5S, 9gq). Persisted score manifest: ScoreManifestStore writes programming profiles, metrics, and scores to ~/Library/Application Support/RootFont/scores.json. Cache keys include file modification time so stale entries invalidate automatically on font file changes. Configurable weight presets: Settings exposes four presets — Default, Terminal Heavy, IDE Heavy, Minimalist — plus ten independent sliders (0–40) for each scoring factor. Changes recalculate scores and re-sort immediately. Score breakdown with “Why” popovers: The preview panel shows a collapsible breakdown, per-factor progress bars, grade badge, and Why buttons that explain measurement method, impact, and example glyphs. Low-grade fonts get an orange hint with weakest factors and quick actions to inspect or compare.
🔬 Font Compare
In-preview candidate picker: Pick any other scored monospaced font from the filtered list and compare it against the selected font without leaving the inspector. Four compare modes: Side-by-side — baseline and candidate code panels rendered next to each other. Overlay — stack both fonts with adjustable opacity and visibility (both / baseline only / candidate only). Glyph zoom — magnified confusable, punctuation, or snippet-extracted glyph samples at configurable scale. Outline diff — bounding-box overlap ratio plus horizontal / vertical shift metrics for a chosen character. Delta summaries: Total score delta, top six factor deltas, and language-coverage diff (baseline only / candidate only / both) are shown under the compare surface. Reliable font resolution: Compare previews resolve the selected PostScript name first and only fall back to the system monospaced font when instantiation fails, so side-by-side rendering reflects the fonts you actually picked.
📝 Code Preview
Sample / Code surface toggle: The preview inspector switches between the existing quick-sample text flow and a dedicated code-preview surface. 12 languages with mini syntax highlighting: MiniTokenizer highlights Swift, TypeScript, JavaScript, Python, Rust, Go, Java, Kotlin, SQL, JSON, Shell, and CSS. Semantic vs Native snippet strategies: SnippetCatalog supplies two snippet styles per language — semantic (readable tutorial-style) and native (idiomatic / compact). Strategy and language pickers are available in both single-font and compare flows. Larger compare code panel: The compare code area is sized for comfortable side-by-side reading when evaluating programming fonts.
🎛 OpenType & Typography Controls
Live OpenType binding: OpenTypeFeatureBinder applies ligatures, slashed / dotted zero, and stylistic-set selections to the preview font in real time. Per-font feature preferences: Ligature, zero-variant, and stylistic-set choices persist per font ID via FontFeaturePreferences in PreferencesStore. Typography toggles retained and extended: Single-line preview, monospaced digits, expanded letter-spacing, and ligature switches work alongside the new OpenType controls in both sample and code surfaces.
❤️ Workflow & Persistence
Font activation service: FontActivationService supports session activation (process scope), user install (copies into ~/Library/Fonts/RootFont/ and registers user scope), uninstall, and startup reconcile to drop stale manifest entries. Preview-header actions: Copy PostScript name, copy editor config, open in Font Book, activate for session, install for all apps (with conflict detection), uninstall managed font, and open the managed-fonts folder — all from the preview header for user fonts. Editor config one-click copy: EditorConfigExporter pastes ready-to-use snippets for VS Code, Cursor, Alacritty, Kitty, Warp, and Zed (font family, size, ligature settings per target format). Unified activation injection: RootFontApp and FontBrowserViewModel share a single FontActivationService instance; About diagnostics include managed-font count.
🔍 Preview Architecture
FontPreviewView decomposed: The inspector is split into FontPreviewHeaderSection, FontPreviewProgrammingPanel, FontPreviewFactorLabels, FontPreviewTextRendering, and FontPreviewTypes — easier to maintain and extend without a single 600+ line view file. Localized quick-sample presets: Preview preset labels (Mixed, English, Chinese, Japanese, Korean, Numeric) route through L10n keys instead of hardcoded English in the picker.
🌍 Localization & Language Support
~155 new L10n keys: Programming workspace, scoring factors, compare modes, activation flows, editor export targets, code-preview controls, and score-breakdown “Why” text are localized across all five locales — en, zh-Hans, zh-Hant, ja, ko. Locale template expanded: Localization/Locales/_template.swift mirrors the new key set for contributors adding future languages. Accessibility labels on new controls: Activation buttons, compare picker, editor-config menu, managed-fonts folder link, and compare-mode controls expose accessibilityLabel for VoiceOver.
🎨 Native macOS Experience
Programming module in sidebar: Library / Programming module switch uses native List sections with SF Symbols (square.grid.2x2 / chevron.left.forwardslash.chevron.right). Load-progress native ProgressView: Staged loading uses SwiftUI linear ProgressView with localized phase labels instead of a static spinner. About panel managed count: Diagnostics and system-info copy lines include how many fonts RootFont is currently managing.
🛠 For Developers
GitHub Actions CI added: .github/workflows/ci.yml runs on macos-14 — swift build, swift test, scripts/check-l10n.py, and scripts/check-version.py. Major test expansion: 12 new or substantially expanded test suites (~80 test cases across 16 files), including ProgrammingScoreEngineTests, FontFeatureInspectorTests, FontMetricsProbeTests, FontActivationServiceTests, EditorConfigExporterTests, FontCatalogServiceScoringTests, ScoreManifestStoreTests, FamilyWeightCoverageTests, SnippetCatalogTests, CompareOverlaySupportTests, FontFilterPerformanceTests, and extended FontBrowserViewModelTests / FontFilterEngineTests. Golden-case scoring coverage: ProgrammingScoreEngineTests and FontCatalogServiceScoringTests lock ranking behavior against representative font profiles. Legacy FontManager removed: The old Sources/FontManager.swift singleton is deleted; FontCatalogService + FontURLIndex own catalog enumeration and caching. Worktree-friendly .gitignore: .worktrees is ignored so local git worktrees stay out of accidental commits.
Still in alpha; the Programming workspace, scoring weights, and compare interactions will continue to evolve. First launch after upgrade may spend noticeable time enriching uncached fonts (feature inspection + metrics). Subsequent launches reuse scores.json and feel much faster. Variable fonts are detected and scored, but there is no UI yet to drag wght / wdth / slnt / opsz axes in preview — stylistic sets and zero variants are toggle-only. CI workflow triggers on push/PR to main and develop; the repository default branch is master, so automated CI may not run until branch names are aligned or the workflow is updated. Distribution remains source-run / local packaging oriented; no formal signed .dmg or App Store release flow yet. FontFilterEngine.applyFilters() still re-reads the activation manifest from disk on every filter pass — fine for typical catalogs but a known follow-up for search-box hot paths.
📦 How to Run
Clone the repository. Run bash scripts/install-git-hooks.sh once per clone. Run locally with swift run RootFontApp, or produce a .app via bash scripts/build-app.sh. Open the package in Xcode with xed . if you prefer the IDE; do not commit a generated .xcodeproj. Press Cmd + R to run (in Xcode) or launch the produced .app directly. Switch to the Programming module in the sidebar to explore scoring, compare, and code preview on monospaced fonts.