# gpui: Do not render ligatures between different styled text runs \(\#37175\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 62083fe7963dd5bed4579bb12abac1b7800cdbaa

Requested commit: 62083fe7963dd5bed4579bb12abac1b7800cdbaa

Commit: 62083fe7963dd5bed4579bb12abac1b7800cdbaa

Tree: 3e8451ac5501d7b07927623e4affe1195271ab65

Author: Lukas Wirth

Committer: GitHub

## Message

```
gpui: Do not render ligatures between different styled text runs (#37175)

Currently when we render text with differing styles adjacently we might
form a ligature between the text, causing the ligature forming
characters to take on one of the two styles. This can especially become
confusing when a ligature is formed between actual text and inlay hints.

Annoyingly, the only ways to prevent this with core text is to either
render each run separately, or to insert a zero-width non-joiner to
force core text to break the ligatures apart, as it otherwise will merge
subsequent font runs of the same fonts.

We currently do layouting on a per line basis and it is unlikely we want
to change that as it would incur a lot of complexity and annoyances to
merge things back into a line, so this goes with the other approach of
inserting ZWNJ characters instead.

Note that neither linux nor windows seem to currently render ligatures,
so this only concerns macOS rendering at the moment.

Release Notes:

- Fixed ligatures forming between real text and inlay hints on macOS
```

## Parents

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

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