Skip to content

Add handling for missing glyphs and utf16 surrogate pairs#1008

Merged
dlamkins merged 2 commits intoblish-hud:devfrom
eksime:fix/950
Feb 4, 2026
Merged

Add handling for missing glyphs and utf16 surrogate pairs#1008
dlamkins merged 2 commits intoblish-hud:devfrom
eksime:fix/950

Conversation

@eksime
Copy link
Contributor

@eksime eksime commented Mar 30, 2025

This addresses some issues with TextInputBase by ensuring that when calculating cursor indexes we take into account both missing glyphs and correctly handle surrogate pair characters.

closes #950

Discussion Reference

https://discord.com/channels/531175899588984842/536970543736291346/1163814521597591562

Is this a breaking change?

Ideally no, however this does change how certain parts of text selection and malformed utf16 is handled as part of the .Text property.

This addresses some issues with TextInputBase by ensuring that when calculating cursor indexes we take into account both missing glyphs and correctly handle surrogate pair characters.

closes blish-hud#950
@dlamkins
Copy link
Member

dlamkins commented Feb 4, 2026

Works great and I also love that it corrects the boundary handling for double-clicking!

Recording.2026-02-03.221303.mp4

@dlamkins dlamkins merged commit c5cf85e into blish-hud:dev Feb 4, 2026
2 checks passed
dlamkins added a commit that referenced this pull request Feb 5, 2026
dlamkins added a commit that referenced this pull request Feb 5, 2026
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.

Texbox crashes when text contains a character not in the font

3 participants