5811 Commits

Author SHA1 Message Date
Kesara Rathnayake 246bc3e268 Refactor text.line_break.get_log_attrs() 2024-12-16 21:46:43 +13:00
Guillaume Ayoub 45d3c93eb4 Merge pull request #2326 from kesara/fix/table-overflow
Fix table overflow edge cases
2024-12-15 19:49:38 +01:00
Guillaume Ayoub 84beeaa06a Minor fixes for test 2024-12-15 19:41:50 +01:00
Kesara Rathnayake 37ce9ed7df Test for table overflow 2024-12-12 01:58:05 +13:00
Guillaume Ayoub 5d36cf53af Improve workaround for line break detection
Related to #2325.
2024-12-10 20:21:10 +01:00
Guillaume Ayoub 9e899253d2 Version 63.1 2024-12-10 16:49:02 +01:00
Kesara Rathnayake 910efca562 Fix table overflow edge cases
Fixes #2325
2024-12-10 22:54:27 +13:00
Guillaume Ayoub 3c6f9a5a55 Merge pull request #2322 from Kozea/windows-build
Improve Windows build
2024-12-09 09:58:44 +01:00
Guillaume Ayoub 003ff42c52 Merge pull request #2323 from Kozea/border-collapse
Fix tests for tables with collapsing borders
2024-12-07 17:08:57 +01:00
Guillaume Ayoub 975a8b4dcc Test that equivalent styles when table borders collapse
As explained by https://www.w3.org/TR/CSS22/tables.html#table-border-styles

Related to #2305.
2024-12-07 17:00:44 +01:00
Guillaume Ayoub aa929d87bd Fix different rendering test
Related to #2305.
2024-12-07 16:53:58 +01:00
Guillaume Ayoub 8d24a10282 Merge pull request #2321 from alexandergitter/contribute-running-weasyprint
Add example invocation of WeasyPrint on the "Contribute" page
2024-12-07 16:47:01 +01:00
Guillaume Ayoub df39db30e4 Don’t add DLL directories when using Windows executable
Related to #2289.
2024-12-07 16:06:23 +01:00
Guillaume Ayoub be0678e863 Don’t manually add fonttools import for pyinstaller
It’s been fixed upstream, see fonttools/fonttools#3531.
2024-12-07 15:58:23 +01:00
Alexander Gitter ad6dbf72bd Add example invocation of WeasyPrint on the "Contribute" page 2024-12-07 14:34:23 +01:00
Guillaume Ayoub db288a4e24 Fix currentcolor detection when parsing gradient color stops
The bug has been introduced by CSS Color Level 4, that set the official
"currentColor"’s serialization string to lowercase "currentcolor".

Note that we still don’t draw the actual current color in this case (according
to the TODO above the fixed line) but black. At least it doesn’t crash
anymore.

Fix #2320.
2024-12-04 14:46:30 +01:00
Guillaume Ayoub e4ed7329ab Fix various memory leaks when subsetting fonts
Fix #2319.
2024-12-03 23:50:35 +01:00
Guillaume Ayoub 150dec6f99 Fix a memory leak of FontConfig config
The config has to be freed twice, because
pango_fc_font_map_set_config increases the number of references to it.

Related to #2319.
2024-12-03 23:50:05 +01:00
Guillaume Ayoub 2270a9b3c9 Don’t crash with SVG symbols
Fix #2316.
2024-12-03 17:06:42 +01:00
Niko Abeler 6446aa48d6 use defined 'image-rendering' attribute for images in SVGs 2024-11-26 16:26:28 +01:00
Guillaume Ayoub 89a6f444ea Sort weasyprint.__all__ again 2024-11-24 12:51:34 +01:00
Guillaume Ayoub fb21e1772a Sort weasyprint.__all__ 2024-11-24 12:47:47 +01:00
Guillaume Ayoub 49393f0329 Don’t forget skip stack when drawing flex items
Fix #2304.
2024-11-24 12:41:14 +01:00
Guillaume Ayoub a2e0bbd691 Don’t try to increase column width when there’s no extra width
Fix #2306.
2024-11-19 15:17:31 +01:00
Guillaume Ayoub 9d028fb832 Merge pull request #2303 from Kozea/fix-2302
Set alpha even when current color channels didn’t change
2024-11-12 16:54:32 +01:00
Guillaume Ayoub 465afd07bc Set alpha even when current color channels didn’t change
Fix #2302.
2024-11-12 11:36:38 +01:00
Guillaume Ayoub d0fcb3c497 Merge pull request #2301 from Kozea/fix_2293
Include floats in calculation of minimum cell height
2024-11-12 09:30:23 +01:00
Guillaume Ayoub 94c23b3911 Merge pull request #2299 from jo-bitsch/patch-1
Update install instructions for alpine
2024-11-12 09:28:42 +01:00
Jó Ágila Bitsch 7562e08471 Update install instructions for alpine without wheels
Updated to match the format of the dependencies with wheels.

Also added `libwebp-dev` to the build dependencies. Otherwise building would work but running

```
weasyprint https://weasyprint.org/ /tmp/test.pdf
```

would fail to include the webp images with error code
```
/usr/lib/python3.10/site-packages/PIL/Image.py:3496: UserWarning: image file could not be identified because WEBP support not installed
```

The prebuilt `Pillow` binary in the wheel includes `webp` support already.
```
2024-11-11 19:31:10 +01:00
Guillaume Ayoub 33763ade9b Remove upper bounds for dependencies
Fix #2297.
2024-11-11 15:34:20 +01:00
Lucie Anglade 8c08e68839 Include floats in calculation of minimum cell height
We calculate the height of a cell by rendering the cell as a block after
setting an auto height to the cell. This way, it can grow if needed.

But setting the height attribute is not enough: we take care of floats in
finish_block_formatting_context, that checks for the style value: we have to
fake this value too.

Related to #2216. Fix #2293.
2024-11-11 15:31:04 +01:00
Guillaume Ayoub 356c7b0cc5 Fix typo 2024-11-11 14:55:30 +01:00
Lucie Anglade 43f5dfad9d Merge pull request #2300 from Kozea/fix_2292
Don’t avoid floats for flex items
2024-11-11 12:00:38 +01:00
Lucie Anglade 0883acf9d9 Don’t avoid floats for flex items.
Fix #2292
2024-11-11 11:57:59 +01:00
Jó Ágila Bitsch 6bdf078171 Update install instructions for alpine
As per the discussion in #699, document an easier way to install WeasyPrint from PyPI when using prebuilt wheels.
2024-11-06 15:21:34 +01:00
Guillaume Ayoub ca74c8e81c Merge pull request #2288 from violuke/patch-1
Allow installation with Pillow v11
2024-10-29 21:10:58 +01:00
Luke Cousins 4ec0225170 Allow installation with Pillow v11 2024-10-29 19:26:11 +00:00
Guillaume Ayoub c9b6c5ef0c Version 63.0 2024-10-29 18:30:00 +01:00
Guillaume Ayoub 701e9cf1bf Merge pull request #2286 from Kozea/color4
Add support of CSS Color Level 4
2024-10-29 17:37:28 +01:00
Lucie Anglade 300cb3c16b Update artifact action version 2024-10-29 15:33:19 +01:00
Guillaume Ayoub e622612038 Support Python 3.13 2024-10-29 10:40:58 +01:00
Guillaume Ayoub e9c4e19fe3 Remove old Python 3.8 code 2024-10-29 10:40:03 +01:00
Guillaume Ayoub aa80901b70 Fix quotes in f-strings for older versions of Python 2024-10-24 17:11:27 +02:00
Guillaume Ayoub 9228a4234a Fix darken/lighten operations with color level 4 2024-10-24 17:05:26 +02:00
Guillaume Ayoub f5d7949dab Don’t use super when it’s not needed 2024-10-24 16:52:26 +02:00
Guillaume Ayoub 832c8bda89 Simplify custom Stream creation 2024-10-24 16:52:26 +02:00
Guillaume Ayoub bfc20039be Use tinycss2.color4 2024-10-24 16:52:23 +02:00
Guillaume Ayoub c2bdaa97eb Use common interface to set colors 2024-10-24 16:50:32 +02:00
Guillaume Ayoub becf6dcafe Merge pull request #2284 from MrLightful/patch-1
Fix duplicate instructions in installation docs
2024-10-23 17:52:44 +02:00
Roman Sirokov 85ce3e3a6a Fix duplicate instructions in installation docs
Fix #2282
2024-10-23 10:01:45 -03:00