# gpui: Further fix extraction of font runs from text runs \(\#43856\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d1d419b209253cb08ccf9175395d3dc5c820e140)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d1d419b209253cb08ccf9175395d3dc5c820e140

Requested commit: d1d419b209253cb08ccf9175395d3dc5c820e140

Commit: d1d419b209253cb08ccf9175395d3dc5c820e140

Tree: 278af73e603ed4269aa4620acf15259cbe8fd019

Author: Mikko Perttunen

Committer: GitHub

## Message

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

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
```

## Parents

- [2e00f40c54e1e0c23af06587cefcfd06eae49a0e](https://git.cafe/gitcafe/zed/commit/2e00f40c54e1e0c23af06587cefcfd06eae49a0e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d1d419b209253cb08ccf9175395d3dc5c820e140?format=markdown)
