Skip to content

gpui_macos: Warn when falling back to NoopTextSystem#59247

Open
grishy wants to merge 1 commit into
zed-industries:mainfrom
grishy:gpui-macos-noop-warning
Open

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

Conversation

@grishy

@grishy grishy commented Jun 13, 2026

Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant