wttrin_png.py: fixed bug
This commit is contained in:
parent
632a4169c5
commit
9f0f9baa32
1 changed files with 9 additions and 8 deletions
|
|
@ -143,14 +143,15 @@ def gen_term(filename, buf, options=None):
|
||||||
(x_pos+CHAR_WIDTH, y_pos+CHAR_HEIGHT)),
|
(x_pos+CHAR_WIDTH, y_pos+CHAR_HEIGHT)),
|
||||||
fill=color_mapping(char.bg))
|
fill=color_mapping(char.bg))
|
||||||
|
|
||||||
cat = script_category(char.data)
|
if char.data:
|
||||||
if cat not in font:
|
cat = script_category(char.data)
|
||||||
print "Unknown font category: %s" % cat
|
if cat not in font:
|
||||||
draw.text(
|
log("Unknown font category: %s" % cat)
|
||||||
(x_pos, y_pos),
|
draw.text(
|
||||||
char.data,
|
(x_pos, y_pos),
|
||||||
font=font.get(cat, font.get('default')),
|
char.data,
|
||||||
fill=current_color)
|
font=font.get(cat, font.get('default')),
|
||||||
|
fill=current_color)
|
||||||
#sys.stdout.write(c.data)
|
#sys.stdout.write(c.data)
|
||||||
|
|
||||||
x_pos += CHAR_WIDTH
|
x_pos += CHAR_WIDTH
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue