You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When use table edit mode, there are some problems when input Chinese characters. because one Chinese character takes two letters space. Can't make the line fix together in edit window. I think that Japanese and some other characters should have the same problems. Really hope it can be fixed. Thank you.
example
The text was updated successfully, but these errors were encountered:
theopathyreg
changed the title
Problems of table edit mode about Chinese characters
Problems of table editing mode about Chinese characters
Oct 25, 2022
This problem happens not only with East Asian languages, but also with emojis, zero-width characters and more.
How much width a character takes depends on a font. Some fonts try to fit all characters into a single width, some fonts are duospaced.
To get a character width in a font, one can use QFontMetrics class (we are already using it for some other purposes). Also, Python has an east_asian_width function in the standard library which returns a code from this classifier.
The problem with the current table editing mode code (written by @Griffon26) is that Qt gives us only the number of added or removed characters, not their values or widths:
When use table edit mode, there are some problems when input Chinese characters. because one Chinese character takes two letters space. Can't make the line fix together in edit window. I think that Japanese and some other characters should have the same problems. Really hope it can be fixed. Thank you.
example
The text was updated successfully, but these errors were encountered: