uuseg icon indicating copy to clipboard operation
uuseg copied to clipboard

Improve `Uuseg_string`'s pretty printers

Open dbuenzli opened this issue 10 years ago • 1 comments

with @pqwy stubborn research on wcwidth. This will yield better results for laying out East Asian text and emojis.

dbuenzli avatar Oct 12 '15 13:10 dbuenzli

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.

pqwy avatar Nov 23 '16 16:11 pqwy