Handle request to render zerowidth text more gracefully

This commit is contained in:
Kovid Goyal
2017-11-01 11:16:45 +05:30
parent 27a1f27e59
commit 96f85b187e

View File

@@ -167,6 +167,8 @@ def missing_glyph(num_cells, cell_width, cell_height):
def render_cell(text=' ', bold=False, italic=False):
num_cells = wcwidth(text[0])
if num_cells < 1:
return render_cell()
def safe_freetype(func):
try: