# Report which requested font families are not present on the system \(\#3006\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d0b15ed9408bf3b7d67eda63d4273b928368724b

Requested commit: d0b15ed9408bf3b7d67eda63d4273b928368724b

Commit: d0b15ed9408bf3b7d67eda63d4273b928368724b

Tree: 5a84015b75421001b8e1aef0996a33f33a258679

Author: Marshall Bowers

Committer: GitHub

## Message

````
Report which requested font families are not present on the system (#3006)

This PR improves the error message when `FontCache.load_family` attempts
to load a font that is not present on the system.

I ran into this while trying to run the `storybook` for the first time.
The error message indicated that a font family was not found, but did
not provide any information as to which font family was being loaded.

### Before

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 8.52s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

### After

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 7.90s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names: `Zed Mono`', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

Release Notes:

- N/A
````

## Parents

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

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