Skip to content

fps: Use Droid Sans Mono on Android - #3312

Closed
Bombatomica64 wants to merge 1 commit into
longbridge:mainfrom
Bombatomica64:fix/fps-android-font
Closed

Bombatomica64 wants to merge 1 commit into
longbridge:mainfrom
Bombatomica64:fix/fps-android-font

Conversation

@Bombatomica64

Copy link
Copy Markdown
Contributor

Description

On Android, the first render of FpsMonitor panics: DEFAULT_FONT falls through to "monospace", which Android's cosmic-text backend does not resolve as an alias. None of GPUI's desktop fallbacks exist there either, so font resolution fails. iOS already has its own branch for the same reason.

This adds an Android branch that uses Droid Sans Mono, a family every Android system image ships (/system/fonts/DroidSansMono.ttf).

Found while testing Kit 0.7.0 on Android; see #3310.

Screenshot

Before: the app aborts with failed to resolve font 'monospace' or any of the fallbacks when the HUD first paints. After: the HUD renders.

How to Test

  • cargo check -p gpui-fps and cargo fmt --check pass on Linux (non-Android targets compile the same code as before).
  • On device: the same change, as a patch on Kit 0.7.0, in an Android test app (Android 13 emulator via Redroid). The FPS HUD renders with a monospace font instead of panicking.

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes. (Not applicable: Android-only cfg.)
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific) — Android-only branch; desktop constants unchanged.

🤖 Generated with Claude Code

The Android text system has no `monospace` alias, so FpsMonitor's
default font resolved to nothing and GPUI panicked when the HUD first
rendered. Use Droid Sans Mono, which every Android image ships.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Bombatomica64

Copy link
Copy Markdown
Contributor Author

Sorry for the noise. I've combined this into a single PR, #3313, so there's only one to review. Closing this one.

@Bombatomica64
Bombatomica64 deleted the fix/fps-android-font branch September 29, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants