1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 16:07:57 +03:00
Commit Graph

3923 Commits

Author SHA1 Message Date
Guillaume Ayoub
ca3e9ab752 Launch 32bit version of ghostscript on Windows 2020-12-12 16:34:06 +01:00
Guillaume Ayoub
c58cd4e7ca Try to use explicit commandline-based ghostscript on Windows 2020-12-12 16:21:02 +01:00
Guillaume Ayoub
07e3673503 Print pdf on errors 2020-12-12 15:59:31 +01:00
Guillaume Ayoub
29666609f4 Print various things on errors 2020-12-12 15:37:40 +01:00
Guillaume Ayoub
8defa11c47 Make tests fail when an error is reported by GhostScript 2020-12-12 15:30:09 +01:00
Guillaume Ayoub
85cfc933c6 Mark one more failing test as xfail 2020-12-12 01:11:24 +01:00
Guillaume Ayoub
ddebd37f14 Don’t mix stdout and stderr for tests 2020-12-12 00:55:44 +01:00
Guillaume Ayoub
b7217e034f Capture stderr for tests 2020-12-12 00:42:09 +01:00
Guillaume Ayoub
a994d32be3 Clean testing workflow 2020-12-12 00:42:01 +01:00
Guillaume Ayoub
75471f21e7 Update brew
Fonts require the new "verified" parameter introduced by Homebrew 2.6.0.
2020-12-12 00:09:26 +01:00
Guillaume Ayoub
05bb8bdc25 Really fix test 2020-12-11 23:37:54 +01:00
Guillaume Ayoub
97cd13fc54 Try to fix test relying on default font 2020-12-11 23:27:11 +01:00
Guillaume Ayoub
921d8f1973 Fix tests failing because of URL case 2020-12-11 00:36:04 +01:00
Guillaume Ayoub
562318f66c Fix the way tests are launched on GitHub 2020-12-11 00:29:33 +01:00
Guillaume Ayoub
81f73ead2e Use the weasyprint.otf font everywhere
Pango has a PANGO_SCALE value of 1024, making it really happy when fonts have a
cadratin value of 1024. Unfortunately, AHEM uses 1000, leading to rounding
errors.

We now use weasyprint.otf everywhere, with 1024. It breaks the exact 20/80
ratio between descent and ascent values, so that we need to use approximate
values for tests relying on an exact position of the baseline.

All the tests should pass, or be explicitely marked as failing.
2020-12-11 00:22:33 +01:00
Guillaume Ayoub
3798b220d6 Mark expected failing tests as xfail 2020-12-10 23:05:44 +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
db111e96c4 Add pydyf requirement
Related to #1263.
2020-12-07 12:04:30 +01:00
Guillaume Ayoub
4f82a4a34e Packaging!
Related to #1247, #1232.
2020-12-06 20:19:59 +01:00
Guillaume Ayoub
9dab1c85c9 Merge branch '52.x' 2020-12-06 19:44:08 +01:00
Guillaume Ayoub
b1a86735f1 Update NEWS 2020-12-06 19:43:50 +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
b1446dc102 Upgrade cffi on Windows for tests 2020-12-06 12:52:15 +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
f886a04e36 Install Ghostscript 2020-12-02 01:06:46 +01:00
Guillaume Ayoub
e5542c9539 Use better names for harfbuzz library discovery 2020-12-02 01:05:56 +01:00
Guillaume Ayoub
7c8f7caa63 Remove python from msys 2020-12-02 00:58:22 +01:00
Guillaume Ayoub
eacd4d7c37 Use preinstalled msys 2020-12-02 00:51:28 +01:00
Guillaume Ayoub
0fe7e7f84d Get Python path for tests 2020-12-02 00:30:55 +01:00
Guillaume Ayoub
80e2a48b52 Try another syntax for PATH 2020-12-02 00:07:20 +01:00
Guillaume Ayoub
5d5fcd842f Fix condition for Ubuntu tests 2020-12-01 13:00:57 +01:00
Guillaume Ayoub
2ce686b7ff Install pango instead of gtk+ for Windows tests 2020-12-01 12:59:21 +01:00
Guillaume Ayoub
61422dfdd2 Fix package name for DejaVu fonts 2020-12-01 12:51:09 +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
2dde098fe5 Set PATH environment variable for Windows 2020-12-01 12:49:10 +01:00
Guillaume Ayoub
3e698e9ff7 Use Ubuntu 20.04 for tests 2020-12-01 12:37:40 +01:00
Guillaume Ayoub
a99fca40e1 Install Ghostscript for macOS tests 2020-12-01 12:37:27 +01:00
Guillaume Ayoub
be46228372 Install pydyf for tests 2020-12-01 12:26:08 +01:00
Guillaume Ayoub
374e41469f Don’t use forbidden set-env command for Windows tests 2020-12-01 12:25:41 +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