Skip to content

gpui: Further fix extraction of font runs from text runs#43856

Merged
Veykril merged 1 commit intozed-industries:mainfrom
cyndis:fix-font-runs
Dec 1, 2025
Merged

gpui: Further fix extraction of font runs from text runs#43856
Veykril merged 1 commit intozed-industries:mainfrom
cyndis:fix-font-runs

Conversation

@cyndis
Copy link
Contributor

@cyndis cyndis commented Dec 1, 2025

After #39928, if a font's weight changes between text runs without other decoration changing, the earlier weight continues to be used for the subsequent run(s).

PR #40840 fixes this in shape_text, but similar code exists also in layout_text. The latter is used for text in the editor view itself, so the issue continues to appear when using a highlighting theme with varied font weights.

Fix the issue by applying the same fix in layout_text.

Closes #42297

Release Notes:

  • Fixed incorrect font weights in editor view when using a highlighting theme with varying font weights

After zed-industries#39928, if a font's weight changes between text runs without
other decoration changing, the earlier weight continues to be used
for the subsequent run(s).

PR zed-industries#40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself,
so the issue continues to appear when using a highlighting theme
with varied font weights.

Fix the issue by applying the same fix in layout_text.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 1, 2025
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@Veykril Veykril changed the title Further fix extraction of font runs from text runs gpui: Further fix extraction of font runs from text runs Dec 1, 2025
@Veykril Veykril merged commit d1d419b into zed-industries:main Dec 1, 2025
25 checks passed
@Veykril
Copy link
Member

Veykril commented Dec 5, 2025

/cherry-pick stable

github-actions bot pushed a commit that referenced this pull request Dec 5, 2025
After #39928, if a font's weight changes between text runs without other
decoration changing, the earlier weight continues to be used for the
subsequent run(s).

PR #40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself, so
the issue continues to appear when using a highlighting theme with
varied font weights.

Fix the issue by applying the same fix in layout_text.

Closes #42297

Release Notes:

- Fixed incorrect font weights in editor view when using a highlighting
theme with varying font weights
zed-zippy bot added a commit that referenced this pull request Dec 5, 2025
…erry-pick to stable) (#44197)

Cherry-pick of #43856 to stable

----
After #39928, if a font's weight changes between text runs without other
decoration changing, the earlier weight continues to be used for the
subsequent run(s).

PR #40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself, so
the issue continues to appear when using a highlighting theme with
varied font weights.

Fix the issue by applying the same fix in layout_text.

Closes #42297

Release Notes:

- Fixed incorrect font weights in editor view when using a highlighting
theme with varying font weights

Co-authored-by: Mikko Perttunen <cyndis@kapsi.fi>
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
…ies#43856)

After zed-industries#39928, if a font's weight changes between text runs without other
decoration changing, the earlier weight continues to be used for the
subsequent run(s).

PR zed-industries#40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself, so
the issue continues to appear when using a highlighting theme with
varied font weights.

Fix the issue by applying the same fix in layout_text.

Closes zed-industries#42297

Release Notes:

- Fixed incorrect font weights in editor view when using a highlighting
theme with varying font weights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theme: Font weight ignored when string.escape has same color as string

2 participants