Stage B, PR 2: drop legacy Glyph fields and DB v6 migration - #66
Merged
Merged
Conversation
…PR 2) Finalises the layers-only Glyph shape. The deprecated top-level `pixels`/`width`/`height`/`xoffset`/`yoffset`/`xadvance` fields are removed from the interface; the `bmf` sub-object is now the only source of BMF char-line metadata, and the layer stack is the only source of ink. `syncLegacyFields` and the defensive `normaliseBmf` are gone. DB v6 backfills `bmf` from the legacy fields on disk and deletes them. PixelEditor `drawCanvas` / `recenterCanvas` now read flatten origin through `flattenGlyph(currentGlyph)`. `portable.ts` still serialises v2 wire format but sources data from `flattenGlyph` and `glyph.bmf`; PR 3 introduces v3 with full layer-stack round-trip. 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
Finalises the layers-only Glyph shape. The deprecated top-level
pixels/width/height/xoffset/yoffset/xadvancefields are removed from the interface; thebmfsub-object is now the only source of BMF char-line metadata, and the layer stack is the only source of ink.syncLegacyFieldsand the defensivenormaliseBmfare gone.bmffrom the legacy fields on disk and deletes them. v3→v6 jumps replay through earlier upgrades; existing local fonts should load cleanly.drawCanvas/recenterCanvasnow read the flatten origin viaflattenGlyph(currentGlyph)— the two legacy-field call sites PR 1 left alive.portable.tsstill serialises v2 wire format, but now sources the flat bitmap fromflattenGlyphand the BMF metadata fromglyph.bmf. PR 3 introduces v3 with full layer-stack round-trip.makeBlankGlyph/initializeGlyphsshed the unusedheightparameter (blank layers are 0×0).glyphs.test.tsandportable.test.tsagainst the new blank semantics; cleaned legacy-field writes frompack.test.ts,layers.test.ts,integration.test.ts; cast legacy reads indb.test.ts.Test plan
pnpm test(13 files, 107 tests)pnpm buildpnpm lint🤖 Generated with Claude Code