1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-09-11 20:47:56 +03:00

Add extra missing spaces

This commit is contained in:
Guillaume Ayoub 2023-07-25 13:10:28 +02:00
parent 8c7dbb1176
commit f4f9d3460d

View File

@ -97,7 +97,7 @@ def text(svg, node, font_size):
if length_adjust == 'spacingAndGlyphs':
# scale letter_spacing up/down to textLength
width_with_spacing = width + spaces_count * letter_spacing
letter_spacing *= text_length/width_with_spacing
letter_spacing *= text_length / width_with_spacing
# calculate the glyphs scaling factor by:
# - deducting the scaled letter_spacing from textLength
# - dividing the calculated value by the original width