Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
947 B

diff -Naur aafigure-0.6.orig/aafigure/aafigure.py aafigure-0.6/aafigure/aafigure.py
--- aafigure-0.6.orig/aafigure/aafigure.py 2019-08-18 16:32:19.366852529 +0100
+++ aafigure-0.6/aafigure/aafigure.py 2019-08-18 16:33:39.092181738 +0100
@@ -89,10 +89,10 @@
charwidths[key] = 1
for line in text.splitlines():
# extend length by 1 for each wide glyph
- line_len = sum(charwidths[east_asian_width(c)] for c in line)
+ line_len = sum(charwidths[east_asian_width(c)] for c in line.decode('UTF-8'))
max_x = max(max_x, line_len)
# pad a space for each wide glyph
- padded_line = ''.join(c + ' ' * (charwidths[east_asian_width(c)] - 1) for c in line)
+ padded_line = ''.join(c + ' ' * (charwidths[east_asian_width(c)] - 1) for c in line.decode('UTF-8'))
self.image.append(padded_line)
y += 1
self.width = max_x