uuseg
uuseg copied to clipboard
Improve `Uuseg_string`'s pretty printers
with @pqwy stubborn research on wcwidth. This will yield better results for laying out East Asian text and emojis.
My conjecture is that there is only one non-combining character per cluster.
If so, there is only one character with non-zero width per cluster, so a good approach would be to drop the cluster segmentation altogether and just print each individual scalar with its measured width.
If not, well, segment into clusters, sum the width within them and dump that out.
I strongly suspect that my conjecture is true, but I'm currently too lazy to verify this.