cowsay-python icon indicating copy to clipboard operation
cowsay-python copied to clipboard

Full-width characters compatibility and `max_width` adjustability

Open maplexgitx0302 opened this issue 2 years ago • 0 comments

Since Chinese characters are full-width (twice larger than half-width characters, e.g., ASCII characters), the previous version break lines corresponding to the length of a string but not the true width of the string. I tried to modified it so it can determine when to break lines correctly.

Also, I want to adjust the value of max_width (default 49 characters). I simply add this argument for each functions so that I can adjust its value. 截圖 2024-01-04 下午5 20 13

maplexgitx0302 avatar Jan 04 '24 09:01 maplexgitx0302