Fix eight bar unicode chars not being rendered at very small font sizes
Fixes #3025
This commit is contained in:
parent
efca2658ea
commit
7122ba820f
@ -666,12 +666,12 @@ def smooth_mosaic(
|
|||||||
def eight_bar(buf: BufType, width: int, height: int, level: int = 1, which: int = 0, horizontal: bool = False) -> None:
|
def eight_bar(buf: BufType, width: int, height: int, level: int = 1, which: int = 0, horizontal: bool = False) -> None:
|
||||||
if horizontal:
|
if horizontal:
|
||||||
x_range = range(0, width)
|
x_range = range(0, width)
|
||||||
thickness = height // 8
|
thickness = max(1, height // 8)
|
||||||
y_start = min(which * thickness, height - 2)
|
y_start = min(which * thickness, height - 2)
|
||||||
y_range = range(y_start, height if which == 7 else min(y_start + thickness, height))
|
y_range = range(y_start, height if which == 7 else min(y_start + thickness, height))
|
||||||
else:
|
else:
|
||||||
y_range = range(0, height)
|
y_range = range(0, height)
|
||||||
thickness = width // 8
|
thickness = max(1, width // 8)
|
||||||
x_start = min(which * thickness, width - 2)
|
x_start = min(which * thickness, width - 2)
|
||||||
x_range = range(x_start, width if which == 7 else min(x_start + thickness, width))
|
x_range = range(x_start, width if which == 7 else min(x_start + thickness, width))
|
||||||
for y in y_range:
|
for y in y_range:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user