5811 Commits

Author SHA1 Message Date
Guillaume Ayoub e68e3fafca Merge branch '62.x' 2024-06-21 11:05:40 +02:00
Guillaume Ayoub f39039b58b Remove useless variable 2024-06-21 11:05:13 +02:00
Guillaume Ayoub 783b2ede7f Merge branch '62.x' 2024-06-21 11:03:09 +02:00
Guillaume Ayoub 39208b0494 Don’t append useless tracks when grid elements are positioned
Fix #2187.
2024-06-21 11:02:17 +02:00
Guillaume Ayoub 3501d56daf Don’t append useless tracks when grid elements are positioned
Fix #2187.
2024-06-21 11:01:23 +02:00
Guillaume Ayoub 8273f652b1 Check that Harfbuzz is at least version 4.1.0 to subset fonts
Fix #2185.
2024-06-17 16:42:54 +02:00
Guillaume Ayoub e8540e7d6c Store width for all glyphs when font is not subset
Some glyphs are not in the cmap table.

Fix #2180.
2024-06-17 16:29:33 +02:00
Guillaume Ayoub fb9d1f85f1 Make items overflowing grid wrap to the next row/column
Fix #2184.
2024-06-17 14:14:27 +02:00
Guillaume Ayoub 76fca69e6c Make items overflowing grid wrap to the next row/column
Fix #2184.
2024-06-17 14:11:53 +02:00
Guillaume Ayoub e7c44e5fcd Respect break-inside: avoid for flex items
Fix #2183.
2024-06-14 12:15:04 +02:00
Guillaume Ayoub 64b3568a63 Merge pull request #2058 from Kozea/rtl-table
Fix right-to-left tables with collapsed borders
2024-06-14 11:29:48 +02:00
Guillaume Ayoub ad5fde9294 Clean table layout module 2024-06-13 11:10:14 +02:00
Guillaume Ayoub 3d0b38d7c9 Add test for rtl collapsed borders 2024-06-13 11:10:14 +02:00
Guillaume Ayoub dcf70993db Fix some cases of right-to-left tables with collapsed borders 2024-06-13 11:10:11 +02:00
Guillaume Ayoub 8f57a3f428 Merge branch '62.x' 2024-06-11 16:12:05 +02:00
Guillaume Ayoub 4c81663305 Fix layout when all footnotes are removed from the footnote area 2024-06-11 15:55:58 +02:00
Guillaume Ayoub 6e93e95354 Split draw module into multiple submodules 2024-06-09 00:56:43 +02:00
Guillaume Ayoub dd57e17632 Merge pull request #2139 from xavidotron/main
Add support for mask-border-* properties
2024-06-08 23:03:24 +02:00
Guillaume Ayoub 03b8f1acc3 Slightly simplify border masks 2024-06-08 23:00:24 +02:00
Xavid Pretzer a846e0062f Add validation tests for mask-border-* properties. 2024-06-08 22:05:18 +02:00
Guillaume Ayoub 03781c3f50 Support mask-border shorthand property. 2024-06-08 22:05:18 +02:00
Xavid Pretzer 4ce7e56085 Implement mask-border-* properties. 2024-06-08 22:05:18 +02:00
Guillaume Ayoub 1efe1b6b0a Run color inversion logic code when image instance is created
The attribute name is more readable this way.
2024-06-08 21:57:54 +02:00
Guillaume Ayoub 4ce48a4214 Merge pull request #2179 from endaxi/main
CMYK JPEGs appearing inverted in PDF output
2024-06-08 21:47:01 +02:00
Guillaume Ayoub 2e3c4801f7 Merge pull request #2178 from Kozea/hb-subset
Subset fonts using Harfbuzz
2024-06-08 21:38:19 +02:00
Guillaume Ayoub 5485d2edf6 Update documentation to advertise about harfbuzz-subset 2024-06-08 16:58:58 +02:00
Guillaume Ayoub 95c47ae9ce Clean PDF font management 2024-06-08 16:41:57 +02:00
Guillaume Ayoub 95d2c37527 Try to subset fonts using Harfbuzz
Related to #2120.
2024-06-08 12:50:28 +02:00
Guillaume Ayoub e9fed42542 Fix font weight definition in Fontconfig configuration 2024-06-08 12:49:43 +02:00
Guillaume Ayoub 3e8717538c Clean code for font management 2024-06-08 12:40:15 +02:00
Guillaume Ayoub f9c9403e4b Remove explicit versions for required software on Linux
Versions here were outdated, correct versions are listed just above.
2024-06-08 12:40:15 +02:00
Guillaume Ayoub 1a33d77598 Read Fontconfig config from memory instead of file 2024-06-08 12:40:15 +02:00
Guillaume Ayoub 7a89290726 Don’t set default Fontconfig values for unset properties 2024-06-08 12:40:15 +02:00
Guillaume Ayoub ef91d5df83 Don’t duplicate column when container is split on multiple pages 2024-06-08 12:40:15 +02:00
Guillaume Ayoub 41a6f11e75 Simplify border drawing 2024-06-08 12:40:15 +02:00
Guillaume Ayoub 82f7527b6a Avoid PDF artifacts when drawing 0-width borders 2024-06-08 12:40:15 +02:00
Guillaume Ayoub 4617b94026 Don’t set default Fontconfig values for unset properties 2024-06-07 23:44:32 +02:00
Guillaume Ayoub d9d7f623d0 Don’t duplicate column when container is split on multiple pages 2024-06-07 17:50:02 +02:00
Gregory Goodson 3752e432b8 CMYK JPEGs appearing inverted in PDF output
Addresses issue [#1128](https://github.com/Kozea/WeasyPrint/issues/1128)

According to
[libjpeg](https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3c17063ef1ab43f5877f19d670dc39497c5cd036/libjpeg.txt#L1569-L1582)
"it appears that Adobe Photoshop writes inverted data in CMYK JPEG
files"

An Adobe JPEG can be identified by the presence of the
[APP14](https://exiftool.org/TagNames/JPEG.html#Adobe)
segment.

The code now checks for the `APP14` segment in `RasterImage` and adds a
Decode Array to the XObject when rendering the CMYK JPEG. The value of
the Decode Array is the inverse of the default value for DeviceCMYK
according to the PDF spec. This has the effect of inverting the inverted
image back to normal.
2024-06-07 16:20:56 +01:00
Guillaume Ayoub 9e9f6902bd Simplify border drawing 2024-06-07 17:20:03 +02:00
Guillaume Ayoub 2c4351e251 Avoid PDF artifacts when drawing 0-width borders 2024-06-07 17:08:11 +02:00
Guillaume Ayoub 61f8bb37d4 Set default PDF variant values in options before generating PDF
We then have the PDF identifier and version set to the variant defaults during
generation.
2024-06-07 17:05:46 +02:00
Guillaume Ayoub d772c83989 Don’t compress PDF metadata for PDF/A-1
Fix #2175.
2024-06-07 17:05:46 +02:00
Guillaume Ayoub 4a5326edbf Simplify (and fix) extra width distribution for auto table layout
Fix #2174.
2024-06-07 17:05:42 +02:00
Guillaume Ayoub 9639ce5d6f Set default PDF variant values in options before generating PDF
We then have the PDF identifier and version set to the variant defaults during
generation.
2024-06-05 14:31:54 +02:00
Guillaume Ayoub 550ed630ab Don’t compress PDF metadata for PDF/A-1
Fix #2175.
2024-06-05 13:38:08 +02:00
Guillaume Ayoub afee4f9943 Remove useless print in test 2024-06-04 23:06:55 +02:00
Guillaume Ayoub e6650d2757 Remove unused import 2024-06-04 23:01:28 +02:00
Guillaume Ayoub f2753214c0 Simplify (and fix) extra width distribution for auto table layout
Fix #2174.
2024-06-04 22:54:40 +02:00
Guillaume Ayoub a3b6ac344f Merge branch '62.x' 2024-06-04 16:20:11 +02:00