1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Document hyphenation.

This commit is contained in:
Simon Sapin 2013-02-27 14:44:21 +01:00
parent c49f060c9f
commit dd2f6ccb79
3 changed files with 34 additions and 2 deletions

View File

@ -6,14 +6,18 @@ Version 0.17
Not released yet.
* For JPEG images, embed them as JPEG in PDF. This often results in smaller
PDF file size compared to the default *deflate* compression.
* Added `text hyphenation`_ with the ``-weasy-hyphens`` property.
* When a document includes JPEG images, embed them as JPEG in the PDF output.
This often results in smaller PDF file size
compared to the default *deflate* compression.
* Switched to using CFFI instead of PyGTK or PyGObject-introspection.
* Layout bug fixes:
- Correctly trim whitespace at the end of lines.
- Fix some cases with floats within inline content.
.. _text hyphenation: http://weasyprint.org/docs/features/#hyphenation
Version 0.16
------------

View File

@ -120,6 +120,32 @@ as invalid with ``*``.
.. _cssselect: http://packages.python.org/cssselect/
.. _hyphenation:
CSS 3 Text: hyphenation
~~~~~~~~~~~~~~~~~~~~~~~
The experimental_ ``-weasy-hyphens`` property controls hyphenation
as described in `CSS 3 Text`.
To get automatic hyphenation, you to set it to ``auto``
*and* have the ``lang`` HTML attribute set to one of the languages
`supported by Pyphen
<https://github.com/Kozea/Pyphen/tree/master/pyphen/dictionaries>`_.
.. _CSS 3 Text: http://www.w3.org/TR/css3-text/#hyphens
.. code-block:: html
<!doctype html>
<html lang=en>
<style>
html { -weasy-hyphens: auto }
</style>
.. _bookmarks:
CSS GCPM: bookmarks

View File

@ -12,6 +12,7 @@ WeasyPrint |version| depends on:
* tinycss_ = 0.3
* cssselect_ ≥ 0.6
* CairoSVG_ ≥ 0.4.1
* Pyphen_
* Optional: GDK-PixBuf_ [#]_
.. _CPython: http://www.python.org/
@ -24,6 +25,7 @@ WeasyPrint |version| depends on:
.. _tinycss: http://packages.python.org/tinycss/
.. _cssselect: http://packages.python.org/cssselect/
.. _CairoSVG: http://cairosvg.org/
.. _Pyphen: https://github.com/Kozea/Pyphen
.. _GDK-PixBuf: https://live.gnome.org/GdkPixbuf