refactor(bridge): order glyph layers once through Font::master_layers - #497
Merged
Merged
Conversation
kostyafarber
force-pushed
the
refactor/font-masters-entrypoint
branch
from
October 3, 2026 13:22
ec3db84 to
04dbc1a
Compare
kostyafarber
force-pushed
the
refactor/font-require-helpers
branch
from
October 3, 2026 13:42
e826a74 to
235fd1f
Compare
kostyafarber
changed the base branch from
refactor/font-masters-entrypoint
to
main
October 3, 2026 13:42
Font::master_layers now yields layers in source order, so the bridge builds glyph records and snapshots straight from it instead of each keeping its own source-order map and sort.
kostyafarber
force-pushed
the
refactor/font-require-helpers
branch
from
October 3, 2026 13:49
235fd1f to
f563558
Compare
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
Font::master_layers(glyph)now returns layers in source order, ordered by layer ID among layers on the same source. This is the order the bridge already sent.get_glyphsandget_glyph_snapshotsread layers straight from it. Each previously built its own source-orderHashMapand ran the same sort with ausize::MAXfallback. Net −35 lines.Builds on #496 (merged).
Issue
No issue — mechanical follow-up to #495.
Testing
cargo clippy -p shift-font -p shift-bridge --all-targetscargo test -p shift-font -p shift-bridgepnpm build:native, thenpnpm --filter @shift/desktop test(1228 tests against the rebuilt bridge)🤖 Generated with Claude Code