Repository navigation
Fix hard crash from a custom terminal font - #11707
Open
mikeysklar wants to merge 1 commit into
Open
mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
Give proportional fonts a cell as wide as their widest glyph, keep glyph slots inside the cache, and fall back to the built-in font when a terminal font still can't load. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
Proportional terminal fonts now get a cell as wide as their widest glyph.
Glyph slots stay inside the cache.
Fonts that still can't work use the built-in font.
Why
Fixes #10848.
The font has a normal space, but the width guess picked a 3 px cell.
Glyphs did not fit, slots ran past the cache, and the terminal raised during boot.
display.cchangeOn a real CLUE, the issue's font now boots as the terminal, with wide gaps between letters.
Limits: proportional text is monospaced, so gaps are wide and some glyphs clip. A font with two widths that aren't 1:2 uses the built-in font. Not fixed here:
bits_per_pixel>= 6 still crashes at boot, and font deinit leaks the glyph bitmap.@lynt-smitka your cp-desktop-lab reproduced this crash and tested the fix before any hardware run.
AI assistance
Claude wrote the patch and ran the lab and CLUE tests. I directed the work and reviewed the results.
🤖 Generated with Claude Code