Simon Sapin
751d99cc78
Move background sizing and positioning from draw to layout.
2013-04-03 17:46:14 +02:00
Simon Sapin
242f24b576
Refactor background layout.
2013-04-03 17:27:07 +02:00
Simon Sapin
171438f48e
2013
2013-04-03 16:23:48 +02:00
Simon Sapin
0faaceb44f
Have Image objects "render themselves" on a cairo Context.
2013-04-03 16:00:31 +02:00
Simon Sapin
e36006ea21
Introduce Image objects, with intrinsic width/height/ratio as attributes.
2013-04-03 13:34:14 +02:00
Simon Sapin
2dfc39ccc6
Negative font-size is invalid.
2013-04-02 18:32:15 +02:00
Simon Sapin
fd276f1c9c
Fix #54 : min/max-width/height on block-level images.
2013-04-02 12:41:52 +02:00
Simon Sapin
c53a01f18f
Changelog for v0.18.
2013-03-30 23:44:12 +01:00
Simon Sapin
cef113c5a7
Add background-repeat: round
2013-03-30 23:43:19 +01:00
Simon Sapin
b5de53169c
Add backgroun-repeat: space
2013-03-30 22:49:47 +01:00
Simon Sapin
8a28f0f08a
Compat with cairocffi 0.4 / CFFI 0.6
2013-03-30 20:55:23 +01:00
Simon Sapin
a11ac81bdd
Fix #53 : crash when backtracking for break-before/after: avoid
2013-03-28 18:25:16 +01:00
Simon Sapin
60526fecd5
Allow page breaks between empty blocks.
2013-03-28 18:22:00 +01:00
Simon Sapin
0f37260c24
Docs: mention converting pycairo contexts to cairocffi.
2013-03-28 16:41:51 +01:00
Simon Sapin
c854feece9
Fix #21 : Check for 'data' URL scheme case-insensitively.
2013-03-28 13:33:28 +01:00
Simon Sapin
86bc8b4978
Fix #66 : Resolve images’ auto width from non-auto height and intrinsic ratio.
2013-03-28 12:44:28 +01:00
Simon Sapin
31d258ba84
Bug fix: use each layer’s own painting (clip) area
2013-03-26 14:07:44 +01:00
Simon Sapin
99541864a1
Simplify background-image a bit.
2013-03-26 13:56:11 +01:00
Simon Sapin
4265b4115a
Add syntax for two keywords in background-repeat.
2013-03-26 12:04:00 +01:00
Simon Sapin
3d4c94acdc
Prepare for L3 background-repeat.
2013-03-25 19:40:27 +01:00
Simon Sapin
055203cd97
Parse background-size in the background shorthand.
2013-03-25 19:05:04 +01:00
Simon Sapin
35b3c1ad8d
Upgrade background-position to Level 3.
2013-03-25 18:59:18 +01:00
Simon Sapin
7fbd46f734
Work around floating point errors when shrink-to-fit = max-content.
2013-03-21 15:51:16 +01:00
Simon Sapin
e4f68e2b27
Prepare background-position internals for Level 3 syntax.
2013-03-21 15:46:07 +01:00
Simon Sapin
c8bd3a3782
Allow percentages in background-size.
2013-03-21 12:53:53 +01:00
Simon Sapin
92b2045ed7
The background shorthands accepts values for -clip and -origin.
2013-03-20 16:19:26 +01:00
Simon Sapin
7a4faac087
Add background-attachement: local
, same as scroll.
...
Since we have no scrolling mechanism,
local and scroll are treated the same.
2013-03-20 13:34:13 +01:00
Simon Sapin
1616e37259
Upgrade the background shorthand for multiple layers.
2013-03-20 13:19:48 +01:00
Simon Sapin
911ed43169
Add support for multiple backgrounds (except for the shorthand.)
2013-03-19 18:29:58 +01:00
Simon Sapin
f284205e78
Changelog for v0.17.1
2013-03-18 19:40:53 +01:00
Simon Sapin
216e13136e
Fix #44 : bad interaction of page-break-before/after: avoid
and floats.
2013-03-18 15:26:11 +01:00
Simon Sapin
408b7d6605
Fix #49 : Division by 0 on dashed or dotted border smaller than one dot/dash.
2013-03-18 13:44:12 +01:00
Simon Sapin
4c04bcd1a9
Fix URL escaping of image references from CSS.
2013-03-18 12:09:57 +01:00
Guillaume Ayoub
158d4cf2a1
Prefix 'hyphens' in the user agent stylesheet
2013-03-14 18:11:58 +01:00
Guillaume Ayoub
59daa1a827
Don't render abosolute boxes twice
2013-03-13 18:50:21 +01:00
Guillaume Ayoub
163f9a04db
Merge branch 'master' of github.com:Kozea/WeasyPrint
2013-03-13 13:50:29 +01:00
Guillaume Ayoub
4011792ee0
Don't remove spaces between inline blocks
2013-03-13 13:49:51 +01:00
Simon Sapin
89bd068990
Allow absolute URLs without a base URL. Fix #42 .
2013-03-13 12:12:12 +01:00
Guillaume Ayoub
0e62dd3fb1
Merge branch 'master' into hyphenation
2013-03-11 23:45:47 +01:00
Guillaume Ayoub
8c960bd9a1
Merge branch 'master' of github.com:Kozea/WeasyPrint
2013-03-11 19:05:19 +01:00
Guillaume Ayoub
84e67995df
Don't strip non-breaking spaces when setting width=0 on empty inline boxes
2013-03-11 19:04:00 +01:00
Simon Sapin
e8581dbd09
Ooops. Fix g_type_init() call.
2013-03-11 15:32:29 +01:00
Simon Sapin
cbba64983d
Try to make glib happy, call g_type_init()
2013-03-08 15:09:45 +01:00
Guillaume Ayoub
fe9382d716
Remove print()
2013-03-06 18:53:43 +01:00
Guillaume Ayoub
efc089aceb
Add hyphenate-limit-chars
2013-03-02 04:41:32 +01:00
Guillaume Ayoub
10d917d1a2
Add hyphenate-limit-zone
2013-03-02 03:42:36 +01:00
Guillaume Ayoub
b5e1fafa5d
Add hyphenate-character
2013-03-02 02:45:48 +01:00
Guillaume Ayoub
987feb6a84
Clean the line splitter
2013-03-02 01:33:37 +01:00
Simon Sapin
c49f060c9f
Add support for -weasy-hyphens: none, cache hyphenation dictionaries
2013-02-27 13:44:57 +01:00
Simon Sapin
b7ed4a906f
Tweak hyphenation and add a micro-test.
2013-02-26 19:45:00 +01:00
Simon Sapin
54df780ae7
Require Pyphen.
...
It is pure-python and self-contained (with dictionaries)
2013-02-26 18:50:57 +01:00
Simon Sapin
43489dec07
Merge branch 'master' into hyphenation
...
Conflicts:
weasyprint/text.py
2013-02-26 18:16:59 +01:00
Simon Sapin
f7e78c488f
Back to native strings for CFFI, still required on PyPy :(
2013-02-26 17:12:08 +01:00
Simon Sapin
46715ad7a2
Try alternative shared library names for Windows.
2013-02-26 15:05:53 +01:00
Simon Sapin
326b7701b5
Remove introspection related cruft.
2013-02-26 15:05:11 +01:00
Simon Sapin
3a42860018
Move GDK-PixBuf code to cairocffi.pixbuf
2013-02-26 15:04:52 +01:00
Simon Sapin
06a9ad8c91
Unicode strings are fine with CFFI 0.5
2013-02-25 16:38:54 +01:00
Simon Sapin
4c4be709d5
Make GDK-PixBuf optional.
2013-02-25 16:34:42 +01:00
Simon Sapin
e2ef91dd99
Fix the GDK-PixBuf loader for images with an alpha channel.
2013-02-25 16:30:39 +01:00
Simon Sapin
9ccd37e088
Don’t bother making CairoSVG optional.
2013-02-25 16:26:39 +01:00
Simon Sapin
d310ffe47d
Merge branch 'cffi'
...
Conflicts:
weasyprint/text.py
2013-02-25 15:23:59 +01:00
Simon Sapin
055f9a3637
Import stuff early, do not try to run --help without importing.
2013-02-25 15:21:25 +01:00
Guillaume Ayoub
6e114af5af
Fix horizontal negative margins for floats
2013-02-25 14:57:50 +01:00
Simon Sapin
9b7c681d27
cairocffi is released, remove the tarball from tox.ini
2013-02-25 14:53:30 +01:00
Simon Sapin
f33e9e8039
Have a better error message when CairoSVG uses pycairo instead of craicffi.
2013-02-25 14:48:56 +01:00
Guillaume Ayoub
c789ba2c91
Don't strip leading non-breaking spaces
2013-02-01 01:57:12 +01:00
Simon Sapin
829c758788
Keep currentColor as a computed value, resolve in used value
...
According to the css3-color errata:
http://www.w3.org/Style/2011/REC-css3-color-20110607-errata.html
2013-01-23 16:52:47 +01:00
Simon Sapin
cfe59387e9
Whitespace fixes.
2013-01-23 16:41:46 +01:00
Simon Sapin
4f9f486ef1
cairocffi accepts byte strings for set_mime_data() now.
2013-01-01 16:55:48 +01:00
Simon Sapin
a1109346df
Update for cairocffi changes.
2012-12-30 11:08:55 +01:00
Simon Sapin
124a28cb15
Convert pixbuf images to cairo with Gdk if available.
2012-12-29 23:02:50 +01:00
Simon Sapin
4eb59f04ec
Update setup.py and tox.ini
2012-12-29 15:27:45 +01:00
Simon Sapin
294be548b0
All tests passsing with cffi!!
2012-12-29 14:55:59 +01:00
Simon Sapin
5baee96712
Use pixbuf through cffi.
2012-12-29 11:58:52 +01:00
Simon Sapin
c70b00b5b8
More WIP: cairocffi and pango cffi.
2012-12-29 01:36:06 +01:00
Simon Sapin
d2040ac77a
WIP: use Pango and cairo through cffi.
...
Use cairocffi
Ditch pycairo, PyGTK and PyGobject-introspection.
2012-12-28 23:17:04 +01:00
Guillaume Ayoub
903490b207
Merge branch 'master' into hyphenation
...
Conflicts:
weasyprint/layout/inlines.py
2012-12-28 17:56:03 +01:00
Guillaume Ayoub
94c719b4ea
Fix some trailing spaces
2012-12-28 17:45:23 +01:00
Guillaume Ayoub
474435c852
Merge branch 'master' into hyphenation
2012-12-26 17:03:48 +01:00
Simon Sapin
2388891ae3
More libxml2 work-arounds.
2012-12-26 17:03:08 +01:00
Guillaume Ayoub
c52a17a3f0
Set the computed value of the "hyphens" property instead of the keyword
2012-12-26 16:56:48 +01:00
Guillaume Ayoub
ee0a53ea1d
Merge branch 'master' into hyphenation
...
Conflicts:
weasyprint/text.py
2012-12-26 16:44:23 +01:00
Guillaume Ayoub
d6b78b30e7
Work around parser changes in libxml2 2.9
2012-12-26 16:43:10 +01:00
Guillaume Ayoub
145027536b
Collapse consecutive text boxes
2012-12-26 16:42:45 +01:00
Guillaume Ayoub
488178c6ab
Typo
2012-12-26 14:47:33 +01:00
Guillaume Ayoub
09aacdc669
Use pyphen instead of hyphenator
2012-12-26 13:25:18 +01:00
Simon Sapin
773bbfe431
Changelog for JPEG embedding.
2012-12-20 20:21:13 +01:00
Simon Sapin
f243dbcca3
Embed JPEG-encoded images in PDF. Fix #6
...
If an image is in JPEG format, embed it as-is in the PDF output.
This often results in smaller PDF file size.
(The image is still decoded however,
so there is no rendering speed improvement.)
2012-12-20 20:12:52 +01:00
Guillaume Ayoub
3ed645d54c
Fix the encoding of the zu_ZA dictionary
2012-12-14 02:40:40 +01:00
Simon Sapin
8995ce77d9
Merge remote-tracking branch 'origin/trailingspaces'
2012-12-12 16:06:20 +01:00
Simon Sapin
f12deb8fc6
Work around a segfault on Python 3.2.
...
Something bad happend when de-allocating a module-level BytesIO()
and dummy PDFSurface.
2012-12-12 16:02:41 +01:00
Simon Sapin
4f8deadc47
Work around a bug in old pycairo versions.
...
See
http://cgit.freedesktop.org/py2cairo/commit/?id=cab2c1295499f57247854e8635b77ca716fa9730
2012-12-12 09:25:28 +01:00
Guillaume Ayoub
667f1d905b
Quick and dirty lang detection for hyphenation
2012-12-09 00:41:12 +01:00
Guillaume Ayoub
fbc2e33b01
Add the -weasy-hyphens CSS property
2012-12-08 22:50:08 +01:00
Guillaume Ayoub
d4fffabb8a
Add base code and dictionaries for hyphenation
2012-12-08 21:43:16 +01:00
Guillaume Ayoub
2325b4c2f4
Give the line length to split_first_line
2012-11-24 16:14:49 +01:00
Guillaume Ayoub
1eb22ed63b
Remove spaces at the end of the text lines
2012-11-22 23:52:50 +01:00
Simon Sapin
0444be5fba
Fix PDF metadata with zoom != 1
2012-11-22 22:49:30 +01:00
Simon Sapin
e9013d0470
Add a test for PDF zoom.
2012-11-22 22:36:51 +01:00
Simon Sapin
85bbfa9258
Rename PDF scale to zoom, have the default be 1 rather than 0.75
...
The 0.75 factor is an implementation detail that should not be exposed
in the API.
2012-11-22 22:31:26 +01:00
Guillaume Ayoub
d2dea8ed56
Fix the size of the first line
2012-11-22 21:23:42 +01:00
Guillaume Ayoub
8c6f6a8189
Remove the width of space-character containers when line breaks are not preserved
2012-11-22 21:23:04 +01:00
Guillaume Ayoub
0b87357daf
Don't always use the whole text to get the first line of a pango layout
2012-11-22 21:21:28 +01:00
Simon Sapin
dda3817880
Merge branch 'patch-1' of https://github.com/mbarkhau/WeasyPrint
2012-11-22 20:10:09 +01:00
mbarkhau
0e09ce8ff9
Add scale factor to write_pdf of HTML class
2012-11-22 18:58:22 +01:00
mbarkhau
aa62d35664
Turn scale factor into parameter for write_pdf
2012-11-22 18:47:20 +01:00
Guillaume Ayoub
b54b9f54af
Fix the W3 testing suite web server
2012-11-16 02:07:56 +01:00
Simon Sapin
6f56613441
Do not require HtmlElement.
...
* Do not use element.base_url which only exists in lxml.html.HtmlElement
* Use lxml.etree.HtmlParser instead of lxml.html
This is one step toward using the html5lib parser, but see
https://github.com/Kozea/WeasyPrint/pull/12
2012-11-06 13:55:39 +01:00
Simon Sapin
ba987f0daf
Remove out-dated parts of the weasyprint.css docstring.
2012-10-09 17:10:45 +02:00
Simon Sapin
3072fff2e5
Docs docs docs.
...
But no ducks.
2012-10-08 19:51:18 +02:00
Simon Sapin
54b46c4b46
Typo fix
2012-10-08 12:13:33 +02:00
Simon Sapin
085d16cebf
Use the Sphinx syntax for command-line options.
2012-10-07 14:54:39 +02:00
Simon Sapin
f5bd8cf8ff
Defer warnings when PixBuf is not available.
...
Previously, a missing PixBuf caused a warning at import-time.
Now the exception is saved and re-raised when an image needs
to be loaded: there is no warning if PixBuf is not used at all.
2012-10-07 10:07:21 +02:00
Simon Sapin
f8457ba3a5
Move save_pixels_to_png() to the test_draw module.
...
This function is only used for tests.
2012-10-07 09:49:07 +02:00
Simon Sapin
a0bb1f2752
Have metadata account for CSS transforms.
2012-10-06 22:09:17 +02:00
Simon Sapin
28cb59fc8b
Pre-compute transformation matricies.
...
… so that they are available when getting meta-data.
2012-10-06 11:26:55 +02:00
Simon Sapin
a7131bd10f
Remove unused imports
2012-10-05 22:12:19 +02:00
Simon Sapin
ba06e7eecc
Nicer whitespace in PDF objects.
2012-10-05 22:06:38 +02:00
Simon Sapin
732f7187a4
Fix bookmarks writing in PDF.
...
The new prepare_metadata() already adds bookmark_root_id to
all values, no need to add it again in write_pdf_metadata()
2012-10-05 21:59:08 +02:00
Simon Sapin
bedcbfe4ed
Remove a debugging print()
2012-10-05 21:50:37 +02:00
Simon Sapin
17621bced0
Fix a crash when pygtk can be imported but not pango.
...
PyGObject 2 works on Python 3 and has a 'pygtk' package.
Importing pygtk does not imply that pango is available through it.
2012-10-05 21:49:26 +02:00
Simon Sapin
eda4bc604e
Move resolution to *.write_png only.
2012-10-05 20:12:05 +02:00
Simon Sapin
e1f5863bc8
Refine docstrings.
2012-10-05 18:50:40 +02:00
Simon Sapin
a05470d006
Remove with_size in Document.write_png
...
The method now always returns a tuple with the size.
HTML.write_png however still does not return the size.
2012-10-05 18:27:45 +02:00
Simon Sapin
c2b2b8c2ea
Escape non-ASCII characters in hyperlinks.
2012-10-04 19:12:34 +02:00
Simon Sapin
726faa9765
Make the Navigator use the public API.
2012-10-04 14:30:42 +02:00
Simon Sapin
6e63903a13
Add metadata in the low-level API.
2012-10-04 13:06:41 +02:00
Simon Sapin
ce484dd85e
Fix the low-level API tests.
2012-10-04 10:58:24 +02:00
Simon Sapin
09ff532828
The Document is back! (But different.)
2012-10-02 18:59:02 +02:00
Simon Sapin
7f033001b7
Remove HTML.get_png_pages
2012-10-02 15:59:59 +02:00
Simon Sapin
d17ee64fa1
Do not repeat a block’s margin-top after a break.
2012-10-02 15:59:58 +02:00
Simon Sapin
b17e807af1
Bug fix: inline-block with vertical-align
2012-10-01 19:30:25 +02:00
Simon Sapin
a564473882
Avoid re-using Pattern objects for images.
2012-09-26 16:59:40 +02:00
Simon Sapin
03d8817690
Cache failures to fetch/load images.
2012-09-26 14:44:43 +02:00
Simon Sapin
ac7f551055
Add tests for the new low-level API.
2012-09-26 14:26:24 +02:00
Simon Sapin
5f86288635
Make GDK-PixBuf truly optional.
2012-09-25 17:56:02 +02:00
Simon Sapin
f8f38f0d35
Compat with early pycairo versions.
2012-09-25 16:37:50 +02:00
Simon Sapin
1de2a00ecb
Use native strings in __main__.py, fix --help on 2.6
2012-09-25 16:37:18 +02:00
Simon Sapin
f33c91742d
Get rid of the Document class (finally!)
2012-09-25 16:37:18 +02:00
Simon Sapin
7984fbd3bc
Warn (not crash) on missing base_url for @import
2012-09-25 16:01:12 +02:00
Simon Sapin
a85c137754
Bug fix: unit conversion for PDF metadata.
2012-09-24 12:46:11 +02:00
Simon Sapin
b066fcf4e8
Doc details.
2012-09-24 12:46:07 +02:00
Simon Sapin
7966e9fed6
Generalize hinting and resolution
...
... in the low-level API, not just PNG output.
2012-09-20 19:24:58 +02:00
Simon Sapin
20fe60040d
Document low-level output functions.
2012-09-20 17:57:15 +02:00
Simon Sapin
933554f7ed
Moar docs for the low-level API.
2012-09-20 17:21:44 +02:00
Simon Sapin
19dd654678
Adapt docs for 0.15
2012-09-20 17:08:03 +02:00
Simon Sapin
a0853a3fc1
Merge branch 'sphinx-doc'
2012-09-20 16:53:33 +02:00
Simon Sapin
87d5741376
Integrate the sphinx docs with docstrings.
2012-09-19 17:37:52 +02:00
Simon Sapin
ac220e9a4d
Refactor the PNG output to use the low-level API
...
… not intermediate ImageSurface objects.
2012-09-18 12:58:58 +02:00
Simon Sapin
c7422f721d
Typo fix, thanks @jdahlin
2012-09-16 11:25:02 +03:00