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

4459 Commits

Author SHA1 Message Date
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
Guillaume Ayoub
482dc6bf1e Merge branch '53.x' 2021-10-13 22:16:07 +02:00
Guillaume Ayoub
0524421ec1 Only enable letter- and word-spacing when needed
Enabling letter-spacing with a value of 0 breaks ligatures, and probably other
typography features.

Fix #1469.
2021-10-13 22:11:58 +02:00
Guillaume Ayoub
833afb68df Remove original_text attribute
This "hack" was introduced to ignore the text-transform property for bookmarks.
Now that the whitespace management logic is done after the box creation (just
before building the bookmark label), we can do the same for the text
transformation (just after building the bookmark label).

Related to #607 and #137.
2021-10-13 21:26:49 +02:00
Guillaume Ayoub
e5beff677a Process whitespaces as soon as box children are set
This early process enables properties with <content-list> values (string-set,
bookmark-label, etc.) to be defined using whitespace-processed strings.

Fix #607.
2021-10-13 09:48:39 +02:00
Guillaume Ayoub
8ff7ed9ab4 Add missing TODO 2021-10-04 13:24:28 +02:00
Guillaume Ayoub
35ab45fbba Merge branch '53.x' 2021-10-03 10:19:46 +02:00
Guillaume Ayoub
ab3ff79bd7 Fix patterns 2021-10-03 10:19:31 +02:00
Guillaume Ayoub
ab631cd596 Merge branch '53.x' 2021-10-02 17:39:15 +02:00
Guillaume Ayoub
f87e1cbe1b Use SVG width/height as inner size when no viewBox is given
Fix #1455.
2021-10-02 17:38:43 +02:00
Guillaume Ayoub
313fb3a7f0 Remove deprecated options 2021-09-22 18:51:49 +02:00
Guillaume Ayoub
754eb8f0a5 Don’t pass useless resume_at 2021-09-20 20:01:46 +02:00
Guillaume Ayoub
ca1d40ce0e Split early break function for inline blocks waiting children 2021-09-20 19:48:16 +02:00
Guillaume Ayoub
6092f15a6e Remove workaround for older versions of Pango
Related to #614.
2021-09-20 18:27:28 +02:00
Guillaume Ayoub
41435b114f Split out of flow rendering for inlines 2021-09-20 17:58:37 +02:00
Guillaume Ayoub
e01ce7fb29 Merge branch '53.x' 2021-09-20 17:43:26 +02:00
Guillaume Ayoub
c5ed3426fe Reorganize and clean layout code 2021-09-20 17:43:04 +02:00
Guillaume Ayoub
df25719cdb Fix background size of pages with a bleed margin
Fix #1446.
2021-09-18 18:37:37 +02:00
Guillaume Ayoub
0cc24e5a18 Fix background size of pages with a bleed margin
Fix #1446.
2021-09-18 18:34:12 +02:00
Guillaume Ayoub
55cf8f53f3 Merge branch 'master' of github.com:Kozea/WeasyPrint 2021-09-13 15:40:16 +02:00
Guillaume Ayoub
35fa9037fd Rename layout files to follow "display" values 2021-09-13 15:37:29 +02:00
Guillaume Ayoub
a809eff415
Merge pull request #1434 from Kozea/emojis
Draw PNG and SVG emojis
2021-09-13 15:13:11 +02:00
Guillaume Ayoub
9a720ac081 Don’t serialize and parse again inline SVG files
Fix #1443.
2021-09-12 17:40:19 +02:00
Guillaume Ayoub
174b827c16 Clean some docstrings 2021-09-12 13:45:32 +02:00
Guillaume Ayoub
37af386852 Cache SVG use tags
Fix #1439.
2021-09-11 14:57:47 +02:00
Guillaume Ayoub
223e97d99a Merge branch '53.x' 2021-09-10 14:26:02 +02:00
Guillaume Ayoub
d2e33977a6 Version 53.3 2021-09-10 14:23:32 +02:00
Guillaume Ayoub
0da2e3d379 Document optimize_size and image_cache
Related to #1439.
2021-09-10 11:33:50 +02:00
Guillaume Ayoub
434b52dd18 Merge branch '53.x' 2021-09-07 23:19:45 +02:00
Guillaume Ayoub
ff93b37333 Use a simpler way to handle image references
Related to #1440.
2021-09-07 23:18:13 +02:00
Guillaume Ayoub
f2cf74d31a Merge branch '53.x' 2021-09-07 22:27:21 +02:00
Guillaume Ayoub
dcb81430a4 Merge branch '53.x' of github.com:Kozea/WeasyPrint into 53.x 2021-09-07 22:26:40 +02:00
Guillaume Ayoub
3fd70e10b4 Don’t crash when transparent images are used twice in CSS
Fix #1440.
2021-09-07 22:25:46 +02:00
Guillaume Ayoub
32ecae2cf5 Use {…} instead of dict(…) syntax 2021-09-06 21:46:45 +02:00
Guillaume Ayoub
85e1ea1043 Don’t use "text-transform"ed text for content-based uses
This solution is far from perfect. What we could do is to have a getter/setter
for the "text" attribute of TextBox using the "original_text" attribute, so
that we’re sure that we change one when we change the other.

But… That would be much more complicated and much slower, only to solve corner
use cases.

Of course, an issue will be open soon, when someone finds one of these cases ;).

Fix #137.
2021-09-06 21:29:25 +02:00
Guillaume Ayoub
083cab037b Merge branch 'master' of github.com:Kozea/WeasyPrint 2021-09-05 19:42:05 +02:00
Guillaume Ayoub
15e7ec8bcc Don’t cut short lines 2021-09-05 19:41:44 +02:00
Guillaume Ayoub
24894a11e6 Handle in-flow children in a dedicated function 2021-09-05 19:32:19 +02:00
Guillaume Ayoub
0dfb48321b Handle linebox children in a dedicated function 2021-09-05 18:27:49 +02:00
Guillaume Ayoub
3e43578ded Handle out-of-flow children in a dedicated function 2021-09-05 18:12:42 +02:00
Guillaume Ayoub
40c7018182 Fix some comments 2021-09-05 17:54:58 +02:00
Guillaume Ayoub
965d46df73 Create a dedicated function to find last in-flow child 2021-09-05 17:50:44 +02:00