1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00
Commit Graph

2305 Commits

Author SHA1 Message Date
Hugh Secker-Walker
9376c95071 Fix typos and awkward grammar on Tutorial and API pages. 2017-04-28 14:36:14 -04:00
Guillaume Ayoub
517ba97af5 Merge branch 'master' of github.com:Kozea/WeasyPrint 2017-04-01 19:15:35 +02:00
Guillaume Ayoub
98ae8c7f95 Merge pull request #445 from Kozea/tinycss2
Switch to tinycss2
2017-04-01 19:04:08 +02:00
Guillaume Ayoub
4e7d1d717a Merge pull request #446 from sunu/master
Let the logging module do the string interpolation
2017-03-28 13:45:10 +02:00
Tarashish Mishra
0fa6838c77 Let the logging module do the string interpolation 2017-03-28 13:02:50 +05:30
Guillaume Ayoub
c8b6794f14 Change an URL in comments 2017-03-26 21:43:23 +02:00
Simon Sapin
18a6ce13c8 Add virtualenvwrapper’s default path to coverage exclusions 2017-03-26 18:46:58 +02:00
Simon Sapin
0aa62e249e Switch to tinycss2 2017-03-26 18:44:21 +02:00
Guillaume Ayoub
daf106e6d1 Don't justify children not in flow
Related to #39.
2017-03-26 17:53:57 +02:00
Guillaume Ayoub
ab2cdebb29 Don't shrink lines with floats by negative values
Related to #39.
2017-03-26 15:37:42 +02:00
Guillaume Ayoub
d3e4599ece Don't use werkzeug anymore in Navigator
Fix #133.

Actually, I'm not sure that Werkzeug was really useful.
2017-03-25 23:31:42 +01:00
Guillaume Ayoub
b3706b06cc Use percentage-resolved width and height to find replaced box height
Fix #327.
2017-03-25 23:02:38 +01:00
Guillaume Ayoub
2e3d0f3c9c Ask for python3-* packages for recent Ubuntu versions
Fix #405.
2017-03-25 22:32:43 +01:00
Guillaume Ayoub
11edf76d01 Update Python version to 3.6 in Windows doc 2017-03-25 22:12:06 +01:00
Guillaume Ayoub
1215cb586a Allow relative URIs in anchors
Fix #437.

Backward-incompatible change: the signature of weasyprint.urls.url_join has
changed to allow relative links without a base URI.

This feature doesn't look really safe at first sight, but I can't find
anything bad coming from these changes. If there's a bug, I take the blame.
2017-03-25 18:28:41 +01:00
Guillaume Ayoub
c1accaa58e Use warnings instead of logs to advertise about old libraries 2017-03-25 15:57:06 +01:00
Guillaume Ayoub
078760706c Ignore coverage for /usr/* files 2017-03-25 15:43:52 +01:00
Guillaume Ayoub
ea513c2a42 Don't clone submodules on Travis 2017-03-25 01:08:35 +01:00
Guillaume Ayoub
5fffe99542 Ignore coverage for Travis virtualenv 2017-03-25 00:45:21 +01:00
Guillaume Ayoub
4f4b4ed598 Use isort in tests 2017-03-25 00:33:36 +01:00
Guillaume Ayoub
ae040e1c71 Respect flake8 everywhere 2017-03-25 00:24:27 +01:00
Guillaume Ayoub
87097b7aed Support ./setup.py test, add tests for python 3.6 2017-03-24 23:18:50 +01:00
Guillaume Ayoub
210b73820d Log to stderr only with CLI
Fix #412.
2017-03-24 23:12:04 +01:00
Guillaume Ayoub
b965562798 Change the documentation about first-letter 2017-02-25 22:50:51 +01:00
Guillaume Ayoub
e1d7d090e9 Version 0.36 2017-02-25 22:11:03 +01:00
Guillaume Ayoub
9c5a71d40d Merge branch 'master' of github.com:Kozea/WeasyPrint 2017-02-25 22:07:14 +01:00
Guillaume Ayoub
2fe75815d1 Version 0.35 2017-02-25 22:03:46 +01:00
Guillaume Ayoub
d6ab8ff542 Merge pull request #407 from Kozea/first
Handle ::first-letter
2017-02-16 15:46:41 +01:00
Guillaume Ayoub
11bf0c72ef Merge pull request #423 from andreas-p/master
Warn broken cairo version
2017-02-07 10:45:23 +01:00
Andreas Pflug
25fdc0e949 Warn broken cairo version 2017-02-06 16:57:54 +01:00
Guillaume Ayoub
1688667cb0 Merge pull request #411 from kylegibson/patch-1
Fixed typos in __main__.py
2017-01-16 13:26:58 +01:00
Kyle Gibson
8983d96acd Fixed typos 2017-01-15 19:55:12 -05:00
Guillaume Ayoub
b2282dd6f8 Try to use WRAP_CHAR instead of WRAP_WORD_CHAR
And add some comments to explain why it doesn't work. Related to #410.
2017-01-11 13:45:24 +01:00
Guillaume Ayoub
5aa34d7dbb Merge pull request #410 from natano/overflow-wrap-break-word
Fix AssertionError in layout.inlines.split_text_box().
2017-01-11 13:00:37 +01:00
Martin Natano
4919f3a643 Fix AssertionError in layout.inlines.split_text_box().
Traceback (most recent call last):
  [...]
  File "/app/env/lib/python3.5/site-packages/weasyprint/layout/inlines.py", line 718, in split_text_box
    'Expected nothing or a preserved line break' % (between,))
AssertionError: Got '1,' between two lines. Expected nothing or a preserved line break

The Assertion Error can be triggered with following minimal test case
(Adobe's Source Sans Pro font must be installed):

	<style type="text/css">
	    p {
		font-family: 'Source Sans Pro';
		font-size: 24pt;
		width: 275pt;
		overflow-wrap: break-word;
	    }
	</style>
	<p>W1D1,W1D7,W2D14,W3D21,W4D28</p>

With the Adobe Source Sans Font the pango line wrapping algorithm
sometimes produces sporadic results. The wrapping seems to be dependent
on the following text, so that a short text doesn't "fit" on a line, but
does if it is followed by more text. This can be worked around in the
split_first_line() function by computing the resume offset at a later
point, so it is in sync with the actual wrapping behaviour.

See https://bugzilla.gnome.org/show_bug.cgi?id=777093.
2017-01-11 12:14:03 +01:00
Guillaume Ayoub
1031371c7b Ignore boxes with no first-letter style 2017-01-02 13:44:03 +01:00
Guillaume Ayoub
5c9a07bf1a Create first-letter box after white space handling
As ::first-letter depends on white space handling, we must create the
box after collapsing spaces, not during the build of the box tree.

This commit makes WeasyPrint pass most of the W3C tests related to
first-letter (and never crash). Known problems left include:

- list markers are considered as the first letter,
- lines may break between the first letter and the rest of the text
  (see #163 and #301),
- the CSS attributes are all kept, some should probably be removed (the
  spec doesn't give a whole list).

Even if W3C tests makes me quite confident (some of them are crazy),
tests must be added in WeasyPrint too.
2017-01-02 13:23:42 +01:00
Guillaume Ayoub
e222779f0a Merge branch 'master' into first 2017-01-02 12:14:49 +01:00
Guillaume Ayoub
f53e8d05ed Version 0.34 2016-12-21 01:11:23 +01:00
Guillaume Ayoub
18b1931374 Clean and test columns
Fix #403.
2016-12-17 00:43:55 +01:00
Guillaume Ayoub
5a07ec0891 Fix the multi-page columns algorithm
Related to #403.
2016-12-16 17:37:39 +01:00
Guillaume Ayoub
cf0efe64cc Cast the number of columns into int
Should fix #403.
2016-12-15 09:02:14 +01:00
Guillaume Ayoub
282b4622f7 Merge branch 'master' of github.com:Kozea/WeasyPrint 2016-12-07 18:29:25 +01:00
Guillaume Ayoub
bf6911d36f Correctly close files open by mkstemp
Python's tempfile.mkstemp already opens files, we don't have to open
them twice. The documentation is not really clear about that but
there's a good post on Logilab's blog: https://www.logilab.org/17873

Fix #396.
2016-12-07 18:25:58 +01:00
Guillaume Ayoub
8f937fdf69 Merge pull request #399 from ikonst/master
Avoid CairoSVG-2.0.0rc* on Python 2
2016-12-06 23:06:23 +01:00
Ilya Konstantantinov
f6daebc60b Avoid CairoSVG-2.0.0rc* on Python 2
It's funny but:
```
pip install --upgrade 'CairoSVG<2'
```
would pull CairoSVG-2.0.0rc6, while
```
pip install --upgrade 'CairoSVG<2.0.0'
```
would pull the 1.x branch (1.0.22 at time of writing).
2016-12-06 10:21:50 -08:00
Guillaume Ayoub
c9a2a0e60d Add a paragraph in docs about presentational hints
Related to #398, thanks to @aih.
2016-12-06 09:56:04 +01:00
Guillaume Ayoub
12c297d7e7 Honor the presentational_hints option for PDFs
Related to #398.
2016-12-06 08:07:58 +01:00
Guillaume Ayoub
b9699688f6 Don't pass skip_stack to insert_first_letter 2016-12-04 16:55:29 +01:00
Guillaume Ayoub
4e8379cb90 Always use two colons for pseudo-elements
Tests now mix one and two colons in CSS, but the user agent stylesheet
and internal representation of the pseudo-elements now awlays use two
colons.
2016-12-04 16:43:49 +01:00