Repository navigation
Conversation
added 2 commits
October 21, 2026 06:49
…pre compiles Corner smoothing added a public field to PaintQuad, which broke every struct literal of it outside the fork (GPUI Kit builds four). Smoothing now rides on SmoothQuad, which PaintQuad::corner_smoothing returns, and paint_quad takes either. Agent: Stag (claude 2.1.296, opus[1m], sikemux 0.5.4-nightly.3, session 66925b4c-f9c4-465f-a5ce-3e4ebcd2a74b, chat agent-96d17a8eae85473a989a96750723befa, host 03c112f7c38a48c2) Agent-Signature: pZtXBYHgwzesOlFkvtmr+ANwVQj30f4mPdzI/GhxBB7MdYi7lqYFPmX6D1eNOBX1JErhWHue9MxREWvPFuh4BQ
Styled::letter_spacing takes ems of the font size. It rides on Font and on each FontRun, so it is part of the line cache key, and is applied once after shaping, which gives every text system the same result. Each character gets the space after it; a cluster shaped into one glyph is spaced once, and the line's width grows by all of it. Agent: Stag (claude 2.1.296, opus[1m], sikemux 0.5.4-nightly.3, session 66925b4c-f9c4-465f-a5ce-3e4ebcd2a74b, chat agent-96d17a8eae85473a989a96750723befa, host 03c112f7c38a48c2) Agent-Signature: BbRWqG10sjJIzeosST0Xnq+UKSbPYsjpxil+7qE+Sia+xvGv9KPCWHMx9vrIQqrSZwnZycJW1B5e4BioAeK4Cw
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.
Two changes that came out of building Sikemux's desktop UI on this fork with GPUI Kit patched onto it through
[patch.crates-io].Keep
PaintQuadas upstream has itCorner smoothing added a public
corner_smoothingfield toPaintQuad, which breaks every struct literal of it written against upstream GPUI. GPUI Kit'sgpui-basehas four, so Kit doesn't build against the fork.Smoothing now rides on a new
SmoothQuad { quad, corner_smoothing }:PaintQuad::corner_smoothingreturns aSmoothQuad.Window::paint_quadtakesimpl Into<SmoothQuad>, so existing calls with aPaintQuadare unchanged.Letter spacing
Styled::letter_spacing(ems)works like CSSletter-spacing.LetterSpacingonFont,TextStyleand eachFontRun, so it cascades like the other text styles and is part of the line cache key.LineLayoutCache, after the platform text system shapes the line. CoreText and cosmic-text give the same result.Known limit:
LineWrapperstill measures characters without it, so wrapped text with letter spacing can break a little late. Spaced text is usually a single-line label, so I left that out of this PR.Adding a field to
FontandFontRunbreaks code that builds them without..Default::default(). GPUI Kit's non-test code doesn't do that; this PR updates the fork's own tests and benches.Checked
cargo check --all-targetsfor gpui, gpui_apple, gpui_macos, gpui_wgpu and gpui_platform.cargo test --libfor gpui, gpui_apple and gpui_wgpu, plus two new tests for the spacing pass. Fivedebug_overlay/bench_contexttests fail with or without this PR on macOS.