fps: Use Droid Sans Mono on Android - #3312
Closed
Bombatomica64 wants to merge 1 commit into
Closed
Bombatomica64 wants to merge 1 commit into
Bombatomica64 wants to merge 1 commit into
Conversation
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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Android, the first render of
FpsMonitorpanics:DEFAULT_FONTfalls 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 fallbackswhen the HUD first paints. After: the HUD renders.How to Test
cargo check -p gpui-fpsandcargo fmt --checkpass on Linux (non-Android targets compile the same code as before).Checklist
cargo runfor story tests related to the changes. (Not applicable: Android-only cfg.)🤖 Generated with Claude Code