mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 08:27:22 +03:00
fac5ee94e5
To draw a text line, the previous behaviour didn't rely only on the text
actually set on the layout, but also relied on the fact that the line
was cut again when drawn. This change removes the line cutting when
drawing, and thus only relies on the line splitting done during the
layout. This fixes a bug causing some words not being displayed at the
end of a text line drawn with hinting, and the actual drawing size with
hinting was bigger than the size calculated during the layout.
The text included in the drawn layout object was sometimes not cut at
the right position, it was longer but cut when actually drawn. This
commit also fixes this, by always setting the right text in the layout
object.
Fixing this bug enables us to remove a hack introduced to fight against
an "accumulation of floating point errors". I now think that "it wasn't
our war"™. I think that the real reasons of this hack were probably:
- a problem with trailing spaces in the shrink-to-fit functions fixed in
commit
|
||
---|---|---|
.. | ||
css | ||
formatting_structure | ||
layout | ||
tests | ||
__init__.py | ||
__main__.py | ||
compat.py | ||
document.py | ||
draw.py | ||
html.py | ||
images.py | ||
logger.py | ||
navigator.py | ||
pdf.py | ||
stacking.py | ||
text.py | ||
urls.py |