Sitelet https://github.com/shift-editor/shift/pull/497
Skip to content

refactor(bridge): order glyph layers once through Font::master_layers - #497

Merged
kostyafarber merged 1 commit into
mainfrom
refactor/font-require-helpers
Oct 3, 2026
Merged

kostyafarber merged 1 commit into
mainfrom
refactor/font-require-helpers

Conversation

@kostyafarber

@kostyafarber kostyafarber commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

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_glyphs and get_glyph_snapshots read layers straight from it. Each previously built its own source-order HashMap and ran the same sort with a usize::MAX fallback. Net −35 lines.
  • No change in what the renderer receives.

Builds on #496 (merged).

Issue

No issue — mechanical follow-up to #495.

Testing

  • cargo clippy -p shift-font -p shift-bridge --all-targets
  • cargo test -p shift-font -p shift-bridge
  • pnpm build:native, then pnpm --filter @shift/desktop test (1228 tests against the rebuilt bridge)

🤖 Generated with Claude Code

@kostyafarber
kostyafarber force-pushed the refactor/font-masters-entrypoint branch from ec3db84 to 04dbc1a Compare October 3, 2026 13:22
@kostyafarber
kostyafarber force-pushed the refactor/font-require-helpers branch from e826a74 to 235fd1f Compare October 3, 2026 13:42
@kostyafarber
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
kostyafarber force-pushed the refactor/font-require-helpers branch from 235fd1f to f563558 Compare October 3, 2026 13:49
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit 71a8390 Oct 3, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant