[codex] Add stable ID font index#65
Merged
Merged
Conversation
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
Adds the stable-ID font substrate for
shift-font.GlyphIdin an orderedIndexMapinstead of keying authored state by glyph name.FontIndexbeside serializableFontDatainsideFontState.Font, including name, Unicode, layer, and glyph/source lookup paths.Fontoperations.Fontcheap to clone withArccopy-on-write semantics.Design Notes
FontDatais now authored serializable data only.FontIndexis derived runtime state and is rebuilt/validated when deserializing. Bulk glyph insertion uses incremental index validation/update to avoid quadratic font construction, while broader identity edits still rebuild/validate indexes for now.Tests
cargo test --workspacepnpm --filter @shift/desktop typecheckcargo check,cargo fmt,cargo clippy, andcargo testAdded coverage for glyph name uniqueness, stable glyph order, Unicode multi-match lookup, layer lookup freshness, serde index rebuilds, and perf marks for rename/Unicode/layer index rebuilds.