Ligatures (<fi>, <fl>, ...) make the TextEditor cursor broken
Is your issue REALLY a bug?
- [x] My issue is indeed a bug!
- [x] I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.
Is there an existing issue for this?
- [x] I have searched the existing issues.
Is this issue related to iced?
- [x] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
For more context, here is a link of my thread opened on Discord, where I shared some demos of the bug (with a minimalist code that I shared too) and discussed about it: https://discord.com/channels/628993209984614400/1365477744477208576
I'm re-posting my demonstration videos here because they're very self-explanatory: https://github.com/user-attachments/assets/fdc40342-ad01-4897-a327-d3c67305038b https://github.com/user-attachments/assets/11a6f833-e1ec-4f0d-aa5b-d84785be297c
With the classic Latin ligatures (fl, fi, ffl, ...) the cursor - although its position is correct according to the indicator at the bottom - is misplaced on the TextEditor UI (as if the ligatures were considered as a single grapheme?). It was while working with colleagues on a project using Iced that we realized that this bug is only present on Linux (we're unable to reproduce it on Windows, for example, and airstrike doesn't seem to have any problems with his Mac).
A similar issue has been fixed for the TextInput (caused by the fi ligature) : https://github.com/iced-rs/iced/issues/2195 and it's still working for me, so I think this bug is just related to the TextEditor. I don't know whether the patch made to TextInput can be applied to TextEditor, but I think there's something to be dug out there.
What is the expected behavior?
Here's a demo showing the expected behavior for ligatures, made on a TextInput: https://github.com/user-attachments/assets/c67f36f5-33dc-424b-8080-9ff1bfd25a80
Version
crates.io release
Operating System
Linux
Do you have any log output?