Closed MadCatX closed 2 months ago
Thanks for making this, I'll review it properly when I have time (I'm a bit busy at the moment).
Thanks for reviewing the PR. Don't worry about the coding style change requests, it's your code and your rules. I'll see what I can do in the upcoming days as I'm a bit busy myself ATM.
My apologies for taking so long to get back to this. I addressed the coding style issues and factored out some parts of functions to macros to avoid the convoluted ifdefs.
I still need to investigate the cursor positioning issue. It appears that I can repro it even with unicode handling switched off. Hopefully I should have more time to work on this now...
I think I figured out the cursor placement issue. Let me know if you'd like me to revise the code further or do some additional tests.
Thanks, I'll try to take a look at the weekend.
Thanks for the comments. I've generalized cursor positioning and byte<->column translation functions. Hopefully I've also fixed an issue where the code would assert on an attempt to get a code point from an empty string. As far as I could test things seem to behave correctly.
I'm sorry for the ping... is there anything else you'd like me to revise?
Sorry, I have it on my list of things to-do to review these changes. But I have been busy/tired lately, so I haven't done it yet.
Thanks for submitting these changes!
This patch adds basic Unicode support to the UI. It relies on Freetype font renderer and is hidden by default behind UI_UNICODE flag. Encoding support is currently limited to UTF-8.
What works:
?
without any other adverse effects.What could be improved:
IsCharAlpha()
function would have to be much more sophisticated.What does not work:
Notes:
carets
inUIStringSelection
to by how many glyphs the caret is offset from the beginning rather than bytes.UITextbox
contains tabs.Comments welcome :)