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

4459 Commits

Author SHA1 Message Date
aschmitz
1b27388421 Support "overflow-wrap: anywhere"
This supports the `overflow-wrap` value `anywhere`: `anywhere` is like
`break-word`, but the soft breaks it allows *are* considered when
calculating min-content intrinsic sizes.
2021-12-13 02:19:50 -06:00
Guillaume Ayoub
f5d6d54cca Split absolute boxes
Fix #36.
2021-12-12 18:58:04 +01:00
Guillaume Ayoub
c22b211e46 Add documentation about WEASYPRINT_DLL_DIRECTORIES
Related to #1435.
2021-12-11 23:48:58 +01:00
Guillaume Ayoub
b7fdfd7fee Use add_dll_directory to add DLL folders on Windows
We can now set the WEASYPRINT_DLL_DIRECTORIES environment variable to list
folders where DLL can be found.

Fix #1435.
2021-12-11 23:31:33 +01:00
Guillaume Ayoub
249336d098 Use single quotes 2021-12-11 18:42:12 +01:00
Guillaume Ayoub
054d62849b Merge branch 'master' of github.com:Kozea/WeasyPrint 2021-12-11 18:40:36 +01:00
Guillaume Ayoub
57da5c848a Fix typo in documentation
Fix #1519.
2021-12-11 18:39:58 +01:00
Guillaume Ayoub
20a203d1c4 Support Python 3.10 2021-12-11 18:37:57 +01:00
Guillaume Ayoub
f124e31f32
Merge pull request #1509 from Kozea/footnotes
Support footnotes
2021-12-11 18:24:06 +01:00
Guillaume Ayoub
87e4765f26 Update documentation 2021-12-11 18:23:04 +01:00
Guillaume Ayoub
21484fafba Merge branch 'master' into footnotes 2021-12-11 17:05:33 +01:00
Guillaume Ayoub
3f596ce21f Fix footnotes for repaginated documents 2021-12-10 17:51:10 +01:00
Guillaume Ayoub
1800bb5ed6 Add test for footnotes margins 2021-12-09 16:40:02 +01:00
Guillaume Ayoub
d4574862c5 Use the margin height to translate the footnote_area 2021-12-09 16:36:02 +01:00
Guillaume Ayoub
8cc6b258a0 Handle footnote-policy 2021-12-09 16:20:39 +01:00
Guillaume Ayoub
f54da35dc7 Report footnotes when previous footnotes are already reported 2021-12-08 21:00:21 +01:00
Guillaume Ayoub
7126f1b804 Remove useless color from tests 2021-12-08 20:29:31 +01:00
Lucie Anglade
7c8c291d96 Add reported footnote test 2021-12-08 17:43:19 +01:00
Guillaume Ayoub
5e6b21cec8 Fix last tests for footnotes 2021-12-08 15:35:54 +01:00
Guillaume Ayoub
ed0916d55c Fix more tests for footnotes 2021-12-08 15:16:45 +01:00
Guillaume Ayoub
a702292a1a Fix inline footnotes test 2021-12-08 15:02:46 +01:00
Guillaume Ayoub
313a09d10e Handle footnote-display
Handling footnote-display requires the footnote area children to be recreated
each time one footnote is added: as footnotes can be blocks or inlines, we have
to create anonymous boxes each time, and thus to do the whole footnote area
layout.
2021-12-07 15:58:27 +01:00
Guillaume Ayoub
232d9eff3b Don’t test twice that footnotes are in the list 2021-12-07 15:14:37 +01:00
Guillaume Ayoub
7aa0860185 Make footnote call’s style inherit from the footnote’s parent
There’s nothing in the specification about that, but here’s what we do now:

- The style of a footnote inherits from its parent’s style, it doesn’t inherit
from the footnote area’s style. That’s how cascade works for real elements, and
there’s no real reason or way to avoid this.

- The style of a footnote marker inherits from the footnote style. The marker
is just like a ::before block regarding to its style, even if it is actually
put before the footnote element in the footnote body.

- The style of a footnote call inherits from the footnote parent’s style. It
doesn’t inherit from the footnote’s style, that’s actually applied to the
footnote and inherited by its marker.

This way, we keep the "normal" cascade for "normal" elements, and have
everything else being quite obvious.

The 1st point is annoying in real-life use cases, because we’d really like to
see the footnote’s style inherit from the footnote area’s style. But we really
don’t want to break the cascade. Do we? No, we don’t.

The 3rd point is probably the most disturbing one, mainly because
.footnote::footnote-call doesn’t match the call: to match a footnote call in a
paragraph, for example, we have to use p::footnote-call instead.
2021-12-07 14:46:26 +01:00
Guillaume Ayoub
6f190a2f20 Add missing underlines and empty strings 2021-12-07 14:46:07 +01:00
Guillaume Ayoub
8ae09175eb Typo 2021-12-06 16:39:25 +01:00
Guillaume Ayoub
d0f30fcb8a Fix tests for floats 2021-12-06 16:14:55 +01:00
Guillaume Ayoub
dd14bb968b Save images in tests when there’s the wrong number of pages 2021-12-06 15:50:55 +01:00
Lucie Anglade
22efdc832b More text in normal flow for absolute/float split tests 2021-12-05 20:08:04 +01:00
Guillaume Ayoub
64797e77f4 Fix test 2021-12-05 19:57:17 +01:00
Guillaume Ayoub
c101e0c6a8 Merge branch 'master' of github.com:Kozea/WeasyPrint 2021-12-05 19:17:05 +01:00
Guillaume Ayoub
379be1e575 Include non-printable characters width during rendering
Fix #1515. Related to #1508.
2021-12-05 19:15:39 +01:00
Lucie Anglade
06fe73d54b Move length check 2021-12-04 23:48:44 +01:00
Lucie Anglade
f0384d1fcf Check if the expected result and the computed one have the same number of pixels. 2021-12-04 17:45:53 +01:00
Lucie Anglade
be71cc6e66 Add xfail on failing tests 2021-12-04 17:44:35 +01:00
Lucie Anglade
7f9503470a Fix expected pixels and add xfails 2021-12-04 17:44:10 +01:00
Lucie Anglade
c761879ade Test absolute split 2021-12-04 16:56:50 +01:00
Lucie Anglade
fcea5f02df Test floats split 2021-12-04 16:56:39 +01:00
Lucie Anglade
2c77f5f2f9 Fix indent 2021-12-04 16:53:50 +01:00
Lucie Anglade
fb12d2ca83 Test floats split 2021-12-04 16:33:54 +01:00
Lucie Anglade
dfc3d0a7d9 Remove useless import 2021-12-04 15:29:45 +01:00
Lucie Anglade
c5f03c2c89 More footnotes tests 2021-11-30 11:24:25 +01:00
Lucie Anglade
d42b0fabfe Some footnotes tests 2021-11-29 16:30:10 +01:00
Lucie Anglade
e6da2c93f9 Merge branch 'footnotes' of github.com:Kozea/WeasyPrint into footnotes 2021-11-29 15:41:46 +01:00
Guillaume Ayoub
5ce71e48fe Merge branch 'master' of github.com:Kozea/WeasyPrint 2021-11-29 15:08:51 +01:00
Guillaume Ayoub
80b88db154 Don’t crash when the font size is really small
Fix #1499.
2021-11-29 15:08:18 +01:00
Guillaume Ayoub
b5d3475eee Fix current position tested when footnotes are added 2021-11-29 12:37:03 +01:00
Guillaume Ayoub
677b083d78
Merge pull request #1505 from ColinKinloch/woff_cache
Reuse decompressed woff files based on hash
2021-11-29 12:24:43 +01:00
Lucie Anglade
8f60b81b56 Add style for footnotes testing 2021-11-29 12:18:53 +01:00
Lucie Anglade
f5e520eae8 Don’t use AnonymousStyle, because it’s not computed style 2021-11-29 12:18:30 +01:00