Split glyph API by identity layer and instance#111
Merged
Conversation
kostyafarber
commented
Jun 28, 2026
| return new GlyphGeometry(glyph.interpolationStructureForFont, values); | ||
| } | ||
|
|
||
| #glyphInstanceInput(glyph: Glyph, location: Signal<AxisLocation>): GlyphInstanceInput { |
Collaborator
Author
There was a problem hiding this comment.
I don't like this returning an input to a glyph instance? do we just inline in the consturctor of a instance when passing in the font?
kostyafarber
commented
Jun 28, 2026
| return `${glyphId}:${sourceId}` as InFlightKey; | ||
| } | ||
|
|
||
| function axisLocationSignal(location: AxisLocation | Signal<AxisLocation>): Signal<AxisLocation> { |
Collaborator
Author
There was a problem hiding this comment.
this is wrong lets examine how this is used and why we need this union type, this feels like it should be a regular getter and a Cell getter split up
kostyafarber
commented
Jun 28, 2026
| return new GlyphGeometry(EMPTY_GLYPH_STRUCTURE, new Float64Array([0])); | ||
| } | ||
|
|
||
| function isSignal<T>(value: T | Signal<T>): value is Signal<T> { |
kostyafarber
commented
Jun 28, 2026
| if (values.length === 0) { | ||
| return this.#geometry.peek(); | ||
| } | ||
| createInstanceForFont(input: GlyphInstanceInput): GlyphInstance { |
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
Fixes #109.
font.instance(...)and authored mutation throughfont.layer(...)/font.editableLayerAt(...)*Cellwrappers plustrack(cell)docs, and removed old dollar-prefixed signal names touched by this workNotes
GlyphInstanceis now read/render/hit-test only; mutation stays onGlyphLayer.Fontassembles the reactive layer/geometry/outline inputs directly, including source and snapshot invalidation.scripts/context-drift-check.pynow runs withoutmarkdown_it; the normal command still exits 1 on existing repo-wide documentation drift outside this PR's scope.Validation
pnpm typecheckpnpm lint:checkpnpm format:checkNODE_OPTIONS=--experimental-global-webcrypto pnpm --filter @shift/desktop exec vitest run src/renderer/src/lib/model/Font.test.ts src/renderer/src/lib/model/Glyph.test.ts src/renderer/src/lib/model/variation.test.ts src/renderer/src/lib/editor/Editor.test.tspython3 -m py_compile scripts/context-drift-check.pypython3 scripts/context-drift-check.pynow executes, but reports existing docs debt: 34 errors and 27 warnings, including the staleapps/desktop/src/renderer/src/bridge/docs/DOCS.mdroute and old dead-symbol references