# gpui: Add helper methods for em width and em advance \(\#24036\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 990bdde5e889c0bba9437abf74306c31732d0d63

Requested commit: 990bdde5e889c0bba9437abf74306c31732d0d63

Commit: 990bdde5e889c0bba9437abf74306c31732d0d63

Tree: fc2a5d24a7fcd96122d9495bb00b13e9214d3961

Author: Marshall Bowers

Committer: GitHub

## Message

```
gpui: Add helper methods for em width and em advance (#24036)

This PR adds two helpers methods to the `TextSystem`:

- `em_width`
- `em_advance`

These methods return the width and advance width for an `em`,
respectively.

We were using these definitions in a number of different spots, and by
unifying them we better canonicalize that an `em` is based on the `m`
character.

Release Notes:

- N/A
```

## Parents

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

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