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

4472 Commits

Author SHA1 Message Date
Guillaume Ayoub
587f235647 Comment failing bug 2021-12-18 20:03:15 +01:00
Guillaume Ayoub
e1aee70a50 Fix SVG fonts 2021-12-14 22:56:23 +01:00
Guillaume Ayoub
e61422ef72 Remove decorations at the top of broken tables 2021-12-14 15:49:42 +01:00
Guillaume Ayoub
483b4c3dc4 Always include borders when calculating table size 2021-12-14 15:31:11 +01:00
Guillaume Ayoub
6d0165a7f7 Fix typo in changelog 2021-12-13 16:15:16 +01:00
Guillaume Ayoub
55c3d7371e Version 54.0b1 2021-12-13 16:09:24 +01:00
Guillaume Ayoub
20ad3941d2 Add footnote-marker pseudo-element 2021-12-13 16:08:47 +01:00
Guillaume Ayoub
7a5c285c87 Don’t remove inline block’s trailing space twice
When we calculate the minimum width of an inline block, the size of the
trailing space is already removed by split_first_line. There’s no need to
remove it twice.

We should probably fix split_first_line to remove the trailing space only when
it’s been asked to. But there’s no obvious situation when we want the minimum
width to include trailing spaces, as the minimum size requires line breaks
everywhere, including after each space.

At least, this commit doesn’t remove trailing spaces twice.

Related to #1520.
2021-12-13 13:08:01 +01:00
Guillaume Ayoub
a65ca19bed Add (failing) tests about minimum width with trailing spaces
Related to #1520.
2021-12-13 12:10:48 +01:00
Guillaume Ayoub
e035142e2a Disable Pango hyphenation when we break words
Related to #1520.
2021-12-13 11:58:48 +01:00
Guillaume Ayoub
6fb0269a36 Add overflow-wrap tests with trailing spaces 2021-12-13 11:20:39 +01:00
Guillaume Ayoub
a27aa37597 Fix overflow-wrap test 2021-12-13 11:16:43 +01:00
Guillaume Ayoub
3c382e399b
Merge pull request #1520 from aschmitz/overflow-wrap-anywhere
Support "overflow-wrap: anywhere"
2021-12-13 10:56:10 +01:00
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