# gpui: Validate font contents at load time\. · gitcafe/zed

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

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

Visibility: public

Requested revision: a1049546a2577b8458e64d526dbb3ad866448e6a

Requested commit: a1049546a2577b8458e64d526dbb3ad866448e6a

Commit: a1049546a2577b8458e64d526dbb3ad866448e6a

Tree: 7718ce785d0f720051ccdf159679e7d66deeb621

Author: Piotr Osiewicz

Committer: Piotr Osiewicz

## Message

```
gpui: Validate font contents at load time.

During layout of EditorElement we use 'm' character from current font to calculate sizes, panicking with fonts that do not have that character (e.g. Arabic fonts). It's not really EditorElement's fault, as it assumes that the font it's dealing with is gonna have that character available.
To prevent a crash, I added validation while loading a family that a given font contains the glyphs we're gonna use down the line.

```

## Parents

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

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