foot/scripts
Daniel Eklöf c758949145
wcwidth: provide our own implementation of wcwidth() and wcswidth()
This commit adds a new script, generate-wcwidth.py, that generates
wcwidth tables from the bundled files (Unicode 14.0):

* DerivedGeneralCategory.txt
* EastAsianWidth.txt

This commit also adds the functions my_wcwidth() and my_wcswidth()
that replaces the system’s wcwidth()+wcswidth(), and uses the
generated tables to map Unicode codepoints to widths.

This is inspired by both XTerm’s wcwidth implementation, as well as
https://github.com/jquast/wcwidth.

Both of those are based on/inspired by
https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
2022-01-05 22:14:15 +01:00
..
benchmark.py scripts: benchmarking utility script 2020-05-31 12:43:03 +02:00
generate-alt-random-writes.py scripts: generate-alt-random: add emoji sequences 2021-06-24 17:30:48 +02:00
generate-wcwidth.py wcwidth: provide our own implementation of wcwidth() and wcswidth() 2022-01-05 22:14:15 +01:00