1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00
Commit Graph

2458 Commits

Author SHA1 Message Date
Guillaume Ayoub
f40d81250c Clean and simplify leaders 2021-01-11 14:38:20 +01:00
Guillaume Ayoub
ff9888285c Initial support of leaders 2021-01-11 14:38:20 +01:00
Guillaume Ayoub
b2c7463701 Include witdh/height when calculating auto margins of absolute boxes
Fix #1264.
2021-01-11 13:14:55 +01:00
Guillaume Ayoub
093199d1ad Fix typo
Fix #1277.
2020-12-24 08:58:25 +01:00
Guillaume Ayoub
5cb1f67018 Merge branch 'master' of github.com:Kozea/WeasyPrint 2020-12-22 16:58:02 +01:00
Guillaume Ayoub
c35a629032 Don’t try to get an earlier page break between columns.
Fix #1191.
2020-12-22 16:51:27 +01:00
Guillaume Ayoub
9647b19516
Merge pull request #1268 from naveen521kk/new-names
Add new dll names
2020-12-22 15:45:42 +01:00
Guillaume Ayoub
a83824d6e1 Set font dictionary before use_references recursion 2020-12-21 14:38:18 +01:00
Guillaume Ayoub
c7b00e82e4 Add pattern type 2020-12-21 14:37:59 +01:00
Guillaume Ayoub
5f1710b74c Use references for smasks in images 2020-12-20 13:57:36 +01:00
Guillaume Ayoub
e166a672f5 Use a font dictionary shareda across the whole document 2020-12-20 12:37:17 +01:00
Guillaume Ayoub
5e932d3fca Revert "Use the same Resources dictionary across the whole document"
This reverts commit af92f3eba6.
2020-12-19 20:06:16 +01:00
Guillaume Ayoub
e4bcb07d55 Use the font descriptor as a reference 2020-12-19 19:02:24 +01:00
Guillaume Ayoub
af92f3eba6 Use the same Resources dictionary across the whole document 2020-12-19 19:01:29 +01:00
Guillaume Ayoub
626177bd20 Include padding, border, padding when calculating inline-block width
Fix #1235.
2020-12-14 07:12:41 +01:00
Syrus Dark
8635f538d7
fix line length 2020-12-14 09:30:35 +05:30
Syrus Dark
44d78f208c
Add new dll names
When building Pango with meson I get the following dll files as output.
So adding it.
2020-12-14 09:13:25 +05:30
Guillaume Ayoub
a8e900110d Don’t render layouts with no size 2020-12-13 15:07:35 +01:00
Guillaume Ayoub
b2f7afd29d Revert "Don’t compress streams"
This reverts commit d0ca0da6bb.
2020-12-12 22:44:41 +01:00
Guillaume Ayoub
d0ca0da6bb Don’t compress streams 2020-12-12 22:34:43 +01:00
Guillaume Ayoub
30c21d92e9 Fully remove Cairo from documentation and code 2020-12-10 22:47:27 +01:00
Guillaume Ayoub
f10b3b56c8 Fix error raised when SVG images are rendered 2020-12-08 15:51:35 +01:00
Guillaume Ayoub
7fe4e74b2e Don’t round glyph positions to PDF points
Fix #1199.
2020-12-08 00:03:50 +01:00
Guillaume Ayoub
cfb9017e84 Remove CairoSVG
Fix #1263.
2020-12-07 12:27:18 +01:00
Guillaume Ayoub
4f82a4a34e Packaging!
Related to #1247, #1232.
2020-12-06 20:19:59 +01:00
Guillaume Ayoub
d6cbf25880 Merge branch '52.x' 2020-12-06 19:40:51 +01:00
Guillaume Ayoub
bf45c2eb9f Merge 52.2 2020-12-06 19:35:24 +01:00
Guillaume Ayoub
5ec1881c51 Version 52.2 2020-12-06 19:14:14 +01:00
Guillaume Ayoub
5c91212624 Really print a lot of things when tests fail 2020-12-06 14:09:22 +01:00
Guillaume Ayoub
b4e0619158 Print a lot of things when tests fail 2020-12-06 13:49:58 +01:00
Guillaume Ayoub
a677b3d3ae Print command result when test fails 2020-12-06 13:27:33 +01:00
Guillaume Ayoub
a2e02086d7 Assert at least one magic number in Ghostscript output 2020-12-06 13:12:13 +01:00
Guillaume Ayoub
a849f9e88b Try to clean tests 2020-12-06 12:47:20 +01:00
Guillaume Ayoub
b65c3649cb Fix Ghostscript’s stdout for Windows 2020-12-02 01:33:22 +01:00
Guillaume Ayoub
e5542c9539 Use better names for harfbuzz library discovery 2020-12-02 01:05:56 +01:00
Guillaume Ayoub
578a191f52 Don’t use capture_output, unsupported by Python 3.6 2020-12-01 12:49:19 +01:00
Guillaume Ayoub
5ed5b54d59 Handle transparent colors in gradients correctly
Gradients must be drawn using a pre-multiplied color space. It means that stop
colors are "weighted" by their alpha channel when we define how transition is
done between two colors.

To explain why this is needed, the best example is "transparent". The
"trasparent" color is set to rgba(0, 0, 0, 0), also known as transparent
black. When there’s a transition from red to transparent, we don’t want to have
a transition to black, as it would be if RGBA values were extrapolated. We want
to have a transition to transparent red.

This problem appears for each transition between colors whose RGB and A
channels are both different.

To fix this, we use the same plain color as the one from the previous stop for
transitions to transparent, and the same plain color as the one from the next
stop for transitions from transparent. For semi-transparent colors, we set a
weight proportional to the color alpha, meaning that opaque colors will take
more place than transparent ones.

This bug appears in Safari: https://bugs.webkit.org/show_bug.cgi?id=150940.
It obviously means that we’re better than Apple. Obviously.
2020-11-30 20:54:26 +01:00
Guillaume Ayoub
29a90fcf2b Merge branch 'pydyf' of github.com:Kozea/WeasyPrint into pydyf 2020-11-30 19:12:59 +01:00
Guillaume Ayoub
5f5f30d3e8 Support transparent gradients 2020-11-30 19:12:41 +01:00
Lucie Anglade
c72539f7ca Remove print 2020-11-29 20:14:37 +01:00
Guillaume Ayoub
f6456f9c0c Remove useless @requires from one test 2020-11-28 14:14:43 +01:00
Guillaume Ayoub
6b1a7970cb Correctly draw borders on the last line of split tables
The previous logic used to find if a row is in the footer was broken. Code is
now cleaner, shorter, with an example in comments and a non-regression test.

Fix #1250.
2020-11-25 14:19:32 +01:00
Guillaume Ayoub
f0231c8b15 Correctly draw borders on the last line of split tables
The previous logic used to find if a row is in the footer was broken. Code is
now cleaner, shorter, with an example in comments and a non-regression test.

Fix #1250.
2020-11-23 20:46:09 +01:00
Guillaume Ayoub
236d1dd309 Don’t render table cells as if they are on empty pages
The page_is_empty was probably set to True to force rendering, but using
max_position=inf should already allow all cells to be rendered.

When cells are rendered with page_is_empty set to True, the top margin of their
first children is removed, because margins are always removed at the top of
blocks split between multiple pages.

Fix #1254.
2020-11-21 19:24:48 +01:00
Guillaume Ayoub
6606927007 Fix URL handling with tinycss2
URLs used to be dedicated tokens in the CSS specification, but it’s now a
common function unless its value isn’t quoted.

tinycss2 1.1.0 includes this change, and WeasyPrint has to take care of these
two different tokens.
2020-11-21 19:24:43 +01:00
Guillaume Ayoub
2af9a49c09 Fix error messages in tests 2020-11-21 19:24:41 +01:00
Lucie Anglade
a6f9c80921 A nice gif to please gdk-pixbuf 2.42.0
See https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/162
2020-11-21 19:15:48 +01:00
Guillaume Ayoub
70229deef7 Don’t render table cells as if they are on empty pages
The page_is_empty was probably set to True to force rendering, but using
max_position=inf should already allow all cells to be rendered.

When cells are rendered with page_is_empty set to True, the top margin of their
first children is removed, because margins are always removed at the top of
blocks split between multiple pages.

Fix #1254.
2020-11-21 18:24:18 +01:00
Guillaume Ayoub
af37f05a95 Version 52.1 2020-11-02 21:40:16 +01:00
Guillaume Ayoub
238e214f9d Fix URL handling with tinycss2
URLs used to be dedicated tokens in the CSS specification, but it’s now a
common function unless its value isn’t quoted.

tinycss2 1.1.0 includes this change, and WeasyPrint has to take care of these
two different tokens.
2020-10-30 11:05:27 +01:00