Skip to content

Improve cosmic-text integration (restored msparkles branch) - #281

Open
LPGhatguy wants to merge 1 commit into
mainfrom
msparkles/improve-cosmic-text
Open

Improve cosmic-text integration (restored msparkles branch)#281
LPGhatguy wants to merge 1 commit into
mainfrom
msparkles/improve-cosmic-text

Conversation

@LPGhatguy

Copy link
Copy Markdown
Member

No description provided.

…xamples, fix most alignment issues, some performance fixes

- update cosmic-text to 0.19
- work around scrolling issues with cosmic text
- fix textbox mouse dragging handling
- fix textbox flickering
- make RenderText calculate widest line of the entire text, and not just what's visible
- slightly improve RenderText performance by reducing unnecessary work
    - cache widest line until text changed
    - cache size until text changed
    - don't prune layouting/shaping results until text changed
- fix RTL text rendering
- fix TextAtlas texture format with Color glyphs (Rgba8SrgbPremultiplied -> Rgba8Srgb)
- fix TextAtlas erroneously and repeatedly re-rendering glyphs when Color glyphs are requested
- cleanup text_renderer.rs a lot
- add mechanism to clear TextAtlas state when fonts change
- change default line height to 1.2
- mark blit as inline
- add more checks for textbox's active state
- add active field to TextBoxResponse
- separate out logic for calculating the max line width into a function
- add full Ime support with text_cursor in input_state and integrate it with winit and SDL
- improve text examples, make them use system fonts, add ability to use system fonts
- fix most alignment issues, add min_width and inline props to control alignment behavior
- make yakui manage its own font selection instead of relying on cosmic-text's mechanisms

also, a bunch of fixes with cursor and selection:
- cursor renders correctly now (there are no longer cases where the cursor either disappears or renders on the wrong line due to cursor affinity)
- ctrl+a works correctly now
- tapping left after ctrl+a works correctly now (puts cursor to start of selection)
- shifting while tapping up/down works correctly now
- selecting whole word works correctly now
- deselecting whole word works correctly now
- deselecting characters works correctly now
- selecting while cursor is inbetween a word works correctly now
@LPGhatguy
LPGhatguy force-pushed the msparkles/improve-cosmic-text branch from 0b165f2 to 206f585 Compare June 18, 2026 17:46
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.

1 participant