Reduce overlap with text when rendering wavy underline at small font sizes
This commit is contained in:
parent
a7a7216b30
commit
019e6efeda
1 changed files with 5 additions and 0 deletions
|
|
@ -130,6 +130,11 @@ def add_intensity(x, y, distance):
|
|||
255, buf[idx] + int(255 * (1 - distance))
|
||||
)
|
||||
|
||||
# Ensure all space at bottom of cell is used
|
||||
min_y = clamp_y(ceil(position + yfactor))
|
||||
if min_y < cell_height - 1:
|
||||
position += cell_height - 1 - min_y
|
||||
|
||||
for x_exact in range(cell_width):
|
||||
y_exact = yfactor * cos(x_exact * xfactor) + position
|
||||
y = clamp_y(ceil(y_exact))
|
||||
|
|
|
|||
Loading…
Reference in a new issue