by Findecanor · 1y ago · 0 comments
A weird drawback however is that Backspace and Delete would not act on logical text order, but as "Delete Left" and "Delete Right". However, there should be a hotkey for swapping default text direction/justificiation globally that I think could make up for some of that.
I think that, if you are honest about the limitations of your program and convey those to your user as a consistent model, the user would be more willing to accept that model. Just don't claim to support Unicode according to spec if it is likely that only a subset will be supported correctly.
But what simpler format?
If it supports all of Unicode it's not simpler. If it doesn't, then it's missing necessary features entire languages rely on. And missing emoji.
I don't understand what benefit you're trying to provide.
This means questions (functions) like “how many characters do I have”, and indexing in general, are not as straight forward as they could be.
So storing each visual character’s character group together, as a single element, results in a simpler interface from a programming standpoint.
Not necessarily as efficient, since either indirection or larger character footprints (or both) are required, but simpler.
This is definitely the route I would go, while implementing other complexity. After that, possibly undoing this “simplicity optimization”, would be a small price to pay for the development convenience.
> If it supports all of Unicode it's not simpler.
The point is that it doesn't. The Unicode that it does not handle should get marked as "illegal character", rendered as boxes and not get mangled unless the user messes with it.
Support for more of Unicode could be added incrementally, and in a single subsystem instead of everywhere in the text editor.
>> If it supports all of Unicode it's not simpler.
> The point is that it doesn't.
But then it doesn't work. Why would you not want to support all of Unicode?
> The Unicode that it does not handle should get marked as "illegal character", rendered as boxes and not get mangled unless the user messes with it.
That's what already happens. We already show boxes when the codepoint is unknown or there's no glyph in the font. Their codepoints are preserved.
> Support for more of Unicode could be added incrementally, and in a single subsystem instead of everywhere in the text editor.
It already is. New OS's get upgraded to new Unicode versions. Text editors don't usually have to change a thing.
I don't know what problem you're trying to solve here.