Adjust rescale threshold
This commit is contained in:
parent
7e34807859
commit
49c81da763
@ -140,7 +140,7 @@ def render_char(text, bold=False, italic=False, width=1):
|
|||||||
extra = bitmap.width - cell_width
|
extra = bitmap.width - cell_width
|
||||||
if italic and extra < cell_width // 2:
|
if italic and extra < cell_width // 2:
|
||||||
bitmap = face.trim_to_width(bitmap, cell_width)
|
bitmap = face.trim_to_width(bitmap, cell_width)
|
||||||
elif extra > max(2, 0.1 * cell_width) and face.is_scalable:
|
elif extra > max(2, 0.3 * cell_width) and face.is_scalable:
|
||||||
# rescale the font size so that the glyph is visible in a single
|
# rescale the font size so that the glyph is visible in a single
|
||||||
# cell and hope somebody updates libc's wcwidth
|
# cell and hope somebody updates libc's wcwidth
|
||||||
sz = cff_size.copy()
|
sz = cff_size.copy()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user