Skip to content

gpui_parley: move to Parley 0.12 - #22

Merged
chris-addison merged 2 commits into
unity/hub-consolidatedfrom
unity/HUB-0000-parley-0.12
Nov 2, 2026
Merged

chris-addison merged 2 commits into
unity/hub-consolidatedfrom
unity/HUB-0000-parley-0.12

Conversation

@chris-addison

@chris-addison chris-addison commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Moves the workspace to Parley 0.12 and fontique 0.12, so the Unity Hub can patch one Parley version (Unity-Technologies/unity-hub#18765).

API changes in gpui_ce_parley:

  • InlineBox takes baseline: None and vertical_align: VerticalAlign::BASELINE, which keep 0.11 placement.
  • AlignmentOptions::last_line_alignment: None keeps 0.11 behaviour.
  • Run::metrics is now Run::font_metrics, which has no line height. The fallback uses ascent + descent + leading, the MetricsRelative(1.0) default.
  • LineMetrics lost ascent/descent. They now come from the line's content bounds around its baseline.
  • Run::normalized_coords returns parlance coords, converted by bits.
  • Layout::inline_boxes is an ExactSizeIterator.

Parley 0.12 keeps preserved whitespace that ends a paragraph inside the line box when it fits (CSS Text 4 conditional hanging). That is what width_with_closing_whitespace (#7) did by hand, so it is removed and the block width is Layout::width. Its test now compares against the text without the space.

Also moves gpui's resvg and usvg to 0.49.0, a version change only, so the Hub's direct usvg 0.49 resolves one copy (Unity-Technologies/unity-hub#18768).

Package versions are unchanged (-unity.20261019); a new -unity.<date> release is still owed.

Tests (macOS): cargo test -p gpui_ce_parley -p gpui_ce_platform -p gpui_ce_elements, cargo test -p gpui-ce, cargo clippy -p gpui_ce_parley -p gpui-ce --all-targets -- -D warnings.

🤖 Generated with Claude Code

chris-addison and others added 2 commits November 2, 2026 11:45
Parley 0.12 (and fontique 0.12) for the Unity Hub, which patches Parley
and needs gpui-ce on the same version.

API changes:
- InlineBox takes a baseline and a vertical alignment: `None` (the
  box's bottom edge) and `VerticalAlign::BASELINE` keep 0.11 placement.
- AlignmentOptions::last_line_alignment: `None` keeps 0.11 behaviour.
- Run::metrics is Run::font_metrics, which has no line height; the
  fallback uses ascent + descent + leading, the MetricsRelative(1.0)
  default.
- LineMetrics lost ascent and descent; they come from the line's
  content bounds around its baseline.
- Run::normalized_coords returns parlance coords; convert by bits.
- Layout::inline_boxes is an ExactSizeIterator.

Parley 0.12 keeps preserved whitespace that ends a paragraph inside the
line box when it fits (CSS Text 4 conditional hanging), so
`width_with_closing_whitespace` is gone and the block width is
`Layout::width`. Its test now compares against the text without the
space instead of `Layout::width`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A version change only: cargo update moves resvg and usvg and nothing else, and gpui-ce's tests and clippy pass unchanged.
@chris-addison
chris-addison merged commit 3bc4015 into unity/hub-consolidated Nov 2, 2026
15 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