Skip to content

Paint underlines below the baseline and strikethroughs above it - #8

Merged
kaylafortin merged 1 commit into
unity/wayland-early-app-idfrom
unity/HUB-8063-underline-offsets
Oct 6, 2026
Merged

kaylafortin merged 1 commit into
unity/wayland-early-app-idfrom
unity/HUB-8063-underline-offsets

Conversation

@kaylafortin

@kaylafortin kaylafortin commented Oct 6, 2026 •

Copy link
Copy Markdown

Jira: HUB-8063

Since the move to Parley, the native Hub paints every underline through the letters and every strikethrough below them. Parley's run metrics are y-up (font convention), gpui adds them to baseline_y in y-down space. This flips both offsets in ParleyTextSystem and adds a regression test.

Based on unity/wayland-early-app-id (the Hub's current pin, 2f324088), so the diff is this one commit. The same commit, cherry-picked onto upstream main, is proposed upstream: gpui-ce#324

Before After
Underlined "Read more" link with the line through the letters Underlined "Read more" link with the line below the letters

Tests: cargo test -p gpui_ce_parley (61 pass, the new test fails without the fix), cargo test -p gpui-ce --lib text_system (14 pass), clippy and fmt clean. Checked in the native Hub on macOS arm64 (Learn tab "Read more").

🤖 Generated with Claude Code

Parley's run metrics carry the font's decoration offsets as the font
stores them, y-up: a post-table underline position below the baseline
is negative, an OS/2 strikeout position above it is positive. gpui adds
the fragment offsets to baseline_y in y-down space, so every underline
was painted through the letters and every strikethrough under them.
Flip both offsets where the Parley text system builds paint fragments.
@kaylafortin
kaylafortin merged commit f0347a3 into unity/wayland-early-app-id Oct 6, 2026
11 of 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.

2 participants