Rename Project to Font across the codebase - #64
Merged
Merged
Conversation
Renames the top-level domain entity from "Project" to "Font" to match how users and the product copy already describe what they're authoring. Touches the directory layout (core/project → core/font; the existing core/font rasterisation module moves to core/rasterize), types (Project → Font), functions (createProject → createFont and siblings), the Zustand slice, and all call sites. The Glyph foreign key projectId → fontId required rebuilding the IndexedDB `glyphs` store because Dexie cannot rename a primary key in place. The glyphs store's compound key changes from [projectId+codePoint] to [fontId+codePoint] via a v4→v5 dance: v4 stashes records into a temporary store and drops the original glyphs store; v5 recreates glyphs with the new key and restores the records. Dexie processes both versions sequentially even when a user jumps from v3 straight to v5. The PortableFont JSON wire format is also bumped to version 2 with the field renamed from `project` to `font` (and `projectId` → `fontId` per glyph). Existing v1 bundles will fail to import with a clear "Unsupported font version: 1" error. Adds CONTEXT.md as the project's glossary, with Font as the canonical term and Source Font preserved as the distinct concept for the uploaded TTF/OTF. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e rebuild Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Source Font: clarify FontFile is a persistence detail, not part of the domain language. Cell: the editor renders layer-by-layer, not at a single per-glyph offset. Portable Font: drop the v1/v2 wire-format note — that belongs to ADR-0001, not the glossary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/project→core/font; the existingcore/fontrasterisation module moves tocore/rasterize), types, functions, the Zustand slice, and all call sites.glyphsstore in a v4→v5 dance because the compound primary key changed from[projectId+codePoint]to[fontId+codePoint]and Dexie cannot rename a primary key in place. See ADR-0002.PortableFontJSON wire format toversion: 2. Existing v1 bundles fail to import with a clear error. See ADR-0001.CONTEXT.mdas the project's glossary, with Font canonical and Source Font preserved as the distinct concept for the uploaded TTF/OTF.Test plan
pnpm exec tsc --noEmitcleanpnpm test— 105/105 passingpnpm buildcleanpnpm lintclean🤖 Generated with Claude Code