Skip to content

gpui_macos: Warn when falling back to NoopTextSystem - #59247

Merged
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
grishy:gpui-macos-noop-warning
Jun 15, 2026
Merged

gpui_macos: Warn when falling back to NoopTextSystem#59247
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
grishy:gpui-macos-noop-warning

Conversation

@grishy

@grishy grishy commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Objective

Without the font-kit feature, MacPlatform silently substitutes gpui::NoopTextSystem, which accepts fonts and resolves font ids but rasterizes every glyph to an empty bitmap.

I hit this with the component_preview example #59241.

Solution

Log a warning at startup in MacPlatform::new() when falling back to NoopTextSystem. Skipped in headless mode, where no text is expected to render and the fallback is a reasonable configuration.

Testing

Checked as part of #59241

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)

Showcase

It just render as like without any error:
cp_pr1_before


Release Notes:

  • N/A or Added/Fixed/Improved ...

Without the "font-kit" feature, MacPlatform silently substitutes
gpui::NoopTextSystem, which accepts fonts and resolves font ids but
rasterizes every glyph to an empty bitmap. The misconfiguration only
surfaces as invisibly blank text in windowed apps, which is expensive
to trace back to a missing cargo feature, so log a warning at startup.

Skip the warning in headless mode, where no text is expected to render
and the fallback is a reasonable configuration.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 13, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 13, 2026
@ChristopherBiscardi ChristopherBiscardi added the area:gpui GPUI rendering framework support label Jun 15, 2026
@ChristopherBiscardi
ChristopherBiscardi added this pull request to the merge queue Jun 15, 2026
Merged via the queue into zed-industries:main with commit 759bacf Jun 15, 2026
52 checks passed
@ChristopherBiscardi ChristopherBiscardi self-assigned this Jun 15, 2026
This was referenced Jun 18, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…59247)

# Objective

Without the `font-kit` feature, `MacPlatform` silently substitutes
`gpui::NoopTextSystem`, which accepts fonts and resolves font ids but
rasterizes every glyph to an empty bitmap.

I hit this with the `component_preview` example
zed-industries#59241.

## Solution

Log a warning at startup in `MacPlatform::new()` when falling back to
`NoopTextSystem`. Skipped in headless mode, where no text is expected to
render and the fallback is a reasonable configuration.

## Testing

Checked as part of zed-industries#59241

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)

## Showcase

It just render as like without any error:
<img width="1312" height="945" alt="cp_pr1_before"
src="https://github.com/user-attachments/assets/f5faf3c0-9523-4c5f-9756-e65cbaf3456f"
/>


---

Release Notes:

- N/A or Added/Fixed/Improved ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpui GPUI rendering framework support cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants