Lucie Anglade
8f60b81b56
Add style for footnotes testing
2021-11-29 12:18:53 +01:00
Lucie Anglade
f5e520eae8
Don’t use AnonymousStyle, because it’s not computed style
2021-11-29 12:18:30 +01:00
Guillaume Ayoub
36b74524bf
Insert footnotes after the layout of each line
2021-11-27 17:40:09 +01:00
Guillaume Ayoub
6a9dac4861
Replace max_position_y by bottom_space
...
As the bottom of the page is now dynamic (because it changes with footnotes),
passing the max_position_y is difficult: it would require the value to be
passed to layout functions, and returned (possibly updated) by these functions.
The new solution is to store the page bottom in the context, and to update it
when a footnote is included. The new max position y is calculated when needed,
using the updated position of the page bottom.
To handle extra bottom spaces (bottom padding/border/margin of a parent box for
example), a bottom_space parameter is given when needed. This value can be set
to -inf when we don’t want to take care of the page bottom (that’s equivalent
to max_position_y=inf).
2021-11-27 17:01:16 +01:00
Guillaume Ayoub
a3b7f7fa71
Display footnotes on the next page when they don’t fit
2021-11-27 14:42:09 +01:00
Guillaume Ayoub
b633bef1a7
Fix footnote style test condition
2021-11-26 11:14:30 +01:00
Guillaume Ayoub
c90886c58a
Don’t crash when footnote area has no style
2021-11-23 21:31:02 +01:00
Guillaume Ayoub
2da0a6c9cf
Update vertical max position when displaying footnotes
2021-11-23 16:18:52 +01:00
Guillaume Ayoub
9f61ce969b
Put markers in footnotes
2021-11-23 14:02:26 +01:00
Guillaume Ayoub
fe5fa64f57
Display footnotes at the bottom of the page
2021-11-23 13:37:53 +01:00
Guillaume Ayoub
1c3fd972bd
Store footnotes in the layout context
2021-11-19 11:39:47 +01:00
Guillaume Ayoub
b36671b684
Allow CSS to set properties for footnote-call pseudo-elements
2021-11-15 16:22:29 +01:00
Guillaume Ayoub
da1cd5e74d
Create and update footnote counter
2021-11-15 15:43:51 +01:00
Guillaume Ayoub
20fdc45ccc
Replace footnotes by footnote-calls
2021-11-15 15:00:59 +01:00
Guillaume Ayoub
75e343591d
Remove footnotes from the flow
2021-11-15 11:54:26 +01:00
Guillaume Ayoub
88e589bcdc
Allow the "footnote" value for "float"
2021-11-15 11:21:09 +01:00
Guillaume Ayoub
aafb119e29
Copy boxes when using them in stacking contexts
...
If we don’t copy the boxes, rendering pages twice will fail because creating
stacking contexts can change the boxes’ children.
Fix #1473 .
2021-11-14 19:41:10 +01:00
Guillaume Ayoub
58c9dbc231
Add an option to return split images when testing PNGs
2021-11-14 19:41:04 +01:00
Guillaume Ayoub
837d64111b
Use the BATCH mode of ghostscript
...
Without this mode, we get the "GS>" prompt at the end of the standard output.
2021-11-14 19:27:34 +01:00
Guillaume Ayoub
046f27bf98
Split blocks in blocks when possible
...
Related to #1476 .
2021-11-14 13:25:04 +01:00
Guillaume Ayoub
dd783efaa9
Merge branch '53.x'
2021-11-14 10:27:11 +01:00
Guillaume Ayoub
8441685ee4
Version 53.4
2021-11-14 10:21:44 +01:00
Guillaume Ayoub
7e7b1d7e91
Include the font hash to create the font name
...
Using the font hash avoids collisions when we have the same font description
but not the same hash, for example when the same font is used in multiple HTML
instances.
It could be possible to only store the font once, this solution is not optimal
but this more reliable.
Fix #1489 .
2021-11-13 19:17:24 +01:00
Guillaume Ayoub
43d0e5442d
Include the font hash to create the font name
...
Using the font hash avoids collisions when we have the same font description
but not the same hash, for example when the same font is used in multiple HTML
instances.
It could be possible to only store the font once, this solution is not optimal
but this more reliable.
Fix #1489 .
2021-11-13 19:05:31 +01:00
Guillaume Ayoub
3aa0683e80
Update documentation about the required version of html5lib
2021-11-13 17:52:29 +01:00
Guillaume Ayoub
d6736bf0f4
Merge pull request #1492 from pablodgonzalez/patch-1
...
Bump html5lib version
2021-11-13 17:51:07 +01:00
Guillaume Ayoub
8a8bfa31fe
Don’t continue to render tables when a row is split
2021-11-13 16:45:31 +01:00
Guillaume Ayoub
183d160663
Remove top and bottom borders from tables when they’re split
2021-11-13 16:44:39 +01:00
Pablo González
07dcb058bd
Bump html5lib version
2021-11-10 17:43:00 -03:00
Guillaume Ayoub
f46e254107
Fix column height with column-span content
...
Fix #1094 .
2021-11-10 21:20:30 +01:00
Guillaume Ayoub
ed20d94c49
Don’t restore current point after empty paths
...
See Kozea/CairoSVG#346 .
2021-11-06 09:23:54 +01:00
Guillaume Ayoub
59f76368fc
Merge branch '53.x'
2021-11-05 22:12:08 +01:00
Guillaume Ayoub
592b621999
Fix images embedded from multiple pages
...
Fix #1486 .
2021-11-05 22:11:09 +01:00
Guillaume Ayoub
f97d3fed5e
Simplify reference creation for API test
...
This change also uses the same source file for reference and tests, allowing
identifiers to be related to URLs.
Related to #1486 .
2021-11-05 22:02:37 +01:00
Guillaume Ayoub
ce44a72318
Fix images embedded from multiple pages
...
Fix #1486 .
2021-11-05 21:59:09 +01:00
Guillaume Ayoub
d62974e0b4
Simplify reference creation for API test
...
This change also uses the same source file for reference and tests, allowing
identifiers to be related to URLs.
Related to #1486 .
2021-11-05 21:33:47 +01:00
Guillaume Ayoub
dce0e56aeb
Merge branch '53.x'
2021-11-04 09:36:38 +01:00
Guillaume Ayoub
e386bc314c
Merge branch '53.x' of github.com:Kozea/WeasyPrint into 53.x
2021-11-04 09:35:24 +01:00
Guillaume Ayoub
f3936ca856
Use better approximations for font ascent and descent values in SVG
...
It’s hard to get real values, because it would require to access the font
information. But we can at least use values related to the font size, so that
alignment doesn’t get totally wrong.
Related to #1485 .
2021-11-04 09:35:13 +01:00
Guillaume Ayoub
fd4711edbe
Handle quotes in url(…) syntax
...
Related to #1485
2021-11-04 09:35:08 +01:00
Guillaume Ayoub
ecedc166b7
Use only one function for PNG conversion
2021-10-30 12:31:26 +02:00
Guillaume Ayoub
766997e94b
Merge branch 'master' of github.com:Kozea/WeasyPrint
2021-10-30 11:54:06 +02:00
Guillaume Ayoub
c3136ad5c6
Merge pull request #1481 from aschmitz/png-reencode
...
change: encode non-JPEG images as PNGs instead of JPEG2000 images
2021-10-30 11:53:39 +02:00
Guillaume Ayoub
222677db55
Allow parallel flows in tables
2021-10-29 19:51:01 +02:00
Guillaume Ayoub
bd753560b4
Remove float width from inline box available width
2021-10-29 16:06:13 +02:00
Guillaume Ayoub
511033471a
Merge remote-tracking branch 'origin/53.x'
2021-10-29 16:04:02 +02:00
aschmitz
730d4f3221
change: encode non-JPEG images as PNGs instead of JPEG2000 images
...
This uses Pillow to re-encode any non-JPEG image as a PNG, then inline that
image's IDAT chunks as a FlateDecode value, which allows us to reuse the work
from the PNG encoder. This means we'll reencode some PNGs we could have passed
through directly, but that could be changed later. Alpha layers continue to be
handled separately, as appears to be required by the PDF spec.
2021-10-29 00:36:04 -05:00
Lucie Anglade
abd54c4bd4
Set SVG ratio when width and height are 0
2021-10-28 11:21:37 +02:00
Guillaume Ayoub
a149af9aaf
Merge branch '53.x'
2021-10-14 16:23:46 +02:00
Guillaume Ayoub
eebb6e5d27
Fix typo in user-agent stylesheet
...
Fix #1471 .
2021-10-14 16:22:57 +02:00