Skip to content

Commit

Permalink
Merge branch 'main' into fix_issue_1278
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jan 26, 2024
2 parents d09ab65 + e018bf3 commit e7fd72f
Show file tree
Hide file tree
Showing 69 changed files with 2,280 additions and 1,065 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/doconfly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: doconfly
on:
push:
branches:
- master
- main
tags:
- "*"

jobs:
doconfly:
name: doconfly job
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.11']
python-version: ['3.12']
include:
- os: ubuntu-latest
python-version: '3.7'
python-version: '3.8'
- os: ubuntu-latest
python-version: 'pypy-3.8'
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WebKit or Gecko. The CSS layout engine is written in Python, designed for
pagination, and meant to be easy to hack on.

* Free software: BSD license
* For Python 3.7+, tested on CPython and PyPy
* For Python 3.8+, tested on CPython and PyPy
* Documentation: https://doc.courtbouillon.org/weasyprint
* Examples: https://weasyprint.org/#samples
* Changelog: https://github.com/Kozea/WeasyPrint/releases
Expand Down
16 changes: 7 additions & 9 deletions docs/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ HTML, including font ``color`` and ``size``, list attributes like ``type`` and
generated by WeasyPrint is missing some of the features you expect from the
HTML, try to enable this option.

.. _User-Agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/master/weasyprint/css/html5_ua.css
.. _User-Agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css
.. _presentational hints: https://www.w3.org/TR/html5/rendering.html#presentational-hints
.. _Pillow: https://python-pillow.org/

Expand All @@ -140,7 +140,7 @@ Keep in mind that *user* stylesheets have a lower priority than *author*
stylesheets in the cascade_, unless you use `!important`_ in declarations
to raise their priority.

.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/master/weasyprint/css/html5_ua.css
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css
.. _cascade: https://www.w3.org/TR/CSS21/cascade.html#cascading-order
.. _!important: https://www.w3.org/TR/CSS21/cascade.html#important-rules

Expand Down Expand Up @@ -332,7 +332,7 @@ supported:
- the ``text-spacing`` property.

.. _#1153: https://github.com/Kozea/WeasyPrint/issues/1153
.. _supported by Pyphen: https://github.com/Kozea/Pyphen/tree/master/pyphen/dictionaries
.. _supported by Pyphen: https://github.com/Kozea/Pyphen/tree/main/pyphen/dictionaries
.. _hyphenation: https://www.w3.org/TR/css-text-3/#hyphenation
.. _CSS Text Module Level 3: https://www.w3.org/TR/css-text-3/
.. _CSS Text Module Level 4: https://www.w3.org/TR/css-text-4/
Expand Down Expand Up @@ -494,7 +494,7 @@ The other features of this module are **not** implemented:
.. _Cross-references: https://www.w3.org/TR/css-content-3/#cross-references
.. _an example: https://github.com/Kozea/WeasyPrint/pull/652#issuecomment-403276559
.. _PDF bookmarks: https://www.w3.org/TR/css-content-3/#bookmark-generation
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/master/weasyprint/css/html5_ua.css
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css

CSS Color Module Level 3
++++++++++++++++++++++++
Expand Down Expand Up @@ -715,11 +715,9 @@ The `CSS Custom Properties for Cascading Variables Module Level 1`_ "introduces
cascading variables as a new primitive value type that is accepted by all CSS
properties, and custom properties for defining them."

The custom properties are supported. The ``var()`` notation is `only supported
in single-value properties`_.
The custom properties and the ``var()`` notation are supported.

.. _CSS Custom Properties for Cascading Variables Module Level 1: https://www.w3.org/TR/css-variables/
.. _only supported in single-value properties: https://github.com/Kozea/WeasyPrint/issues/1219

CSS Text Decoration Module Level 3
++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -765,7 +763,7 @@ The ``resize``, ``cursor``, ``caret-*`` and ``nav-*`` properties are **not**
supported.

The ``appearance`` property is supported. When set to ``auto``, it displays
form fields as PDF form fields (supported for text inputs, check boxes and
text areas only).
form fields as PDF form fields (supported for text inputs, check boxes, text
areas, and select only).

The ``accent-color`` property is **not** supported.
166 changes: 166 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,172 @@ Changelog
=========


Version 60.2
------------

Released on 2023-12-11.

Bug fixes:

* `#1982 <https://github.com/Kozea/WeasyPrint/issues/1982>`_:
Fix SVG markers size, position and drawing
* `23cfc775 <https://github.com/Kozea/WeasyPrint/commit/23cfc775>`_:
Draw background behind absolutely positioned replaced boxes
* `fe2f0c69 <https://github.com/Kozea/WeasyPrint/commit/fe2f0c69>`_:
Don’t crash with bitmap fonts with no "glyf" table
* `14605225 <https://github.com/Kozea/WeasyPrint/commit/14605225>`_:
Improve SVG text-anchor attribute

Contributors:

* Guillaume Ayoub

Backers and sponsors:

* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yvez Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor


Version 60.1
------------

Released on 2023-09-29.

Bug fixes:

* `#1973 <https://github.com/Kozea/WeasyPrint/issues/1973>`_:
Fix crash caused by wrong UTF-8 indices

Contributors:

* Guillaume Ayoub

Backers and sponsors:

* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yvez Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor


Version 60.0
------------

Released on 2023-09-25.

New features:

* `#1903 <https://github.com/Kozea/WeasyPrint/issues/1903>`_:
Print form fields
* `#1922 <https://github.com/Kozea/WeasyPrint/pull/1922>`_:
Add support for textLength and lengthAdjust in SVG text elements
* `#1965 <https://github.com/Kozea/WeasyPrint/issues/1965>`_:
Handle <wbr> tag
* `#1970 <https://github.com/Kozea/WeasyPrint/pull/1970>`_:
Handle y offset of glyphs
* `#1909 <https://github.com/Kozea/WeasyPrint/issues/1909>`_:
Add a --timeout option

Bug fixes:

* `#1887 <https://github.com/Kozea/WeasyPrint/pull/1887>`_:
Fix footnote-call displayed incorrectly for some fonts
* `#1890 <https://github.com/Kozea/WeasyPrint/pull/1890>`_:
Fix page-margin boxes layout algorithm
* `#1908 <https://github.com/Kozea/WeasyPrint/pull/1908>`_:
Fix IndexError when rendering PDF version 1.4
* `#1906 <https://github.com/Kozea/WeasyPrint/issues/1906>`_:
Apply text transformations to first-letter pseudo elements
* `#1915 <https://github.com/Kozea/WeasyPrint/pull/1915>`_:
Avoid footnote appearing before its call
* `#1934 <https://github.com/Kozea/WeasyPrint/pull/1934>`_:
Fix balance before "column-span: all"
* `#1935 <https://github.com/Kozea/WeasyPrint/issues/1935>`_:
Only draw required glyph with OpenType-SVG fonts
* `#1595 <https://github.com/Kozea/WeasyPrint/issues/1595>`_:
Don’t draw clipPath when defined after reference
* `#1895 <https://github.com/Kozea/WeasyPrint/pull/1895>`_:
Don’t ignore min-width when computing cell size
* `#1899 <https://github.com/Kozea/WeasyPrint/pull/1899>`_:
Fix named pages inheritance
* `#1936 <https://github.com/Kozea/WeasyPrint/pull/1936>`_:
Avoid page breaks caused by children of overflow hidden boxes
* `#1943 <https://github.com/Kozea/WeasyPrint/issues/1943>`_:
Use bleed area for page’s painting area
* `#1946 <https://github.com/Kozea/WeasyPrint/issues/1946>`_:
Use margin box of children to define available width for leaders

Contributors:

* Guillaume Ayoub
* Sahil Rohilla
* Azharuddin Syed
* kygoh
* Andy Lenards
* Gaurav Samudra
* Michael Wedl
* Lucie Anglade
* Obeida Shamoun
* Evgeniy Krysanov

Backers and sponsors:

* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yvez Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor


Version 59.0
------------

Expand Down
4 changes: 3 additions & 1 deletion docs/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Tests
Tests are stored in the ``tests`` folder at the top of the repository. They use
the pytest_ library.

Tests require Ghostscript_ to be installed and available on the local path.
Tests require Ghostscript_ to be installed and available on the local path. You
should also install all the `DejaVu fonts`_ if you’re on Linux.

You can launch tests using the following command::

Expand All @@ -58,6 +59,7 @@ style::

.. _pytest: https://docs.pytest.org/
.. _Ghostscript: https://www.ghostscript.com/
.. _DejaVu fonts: https://dejavu-fonts.github.io/
.. _isort: https://pycqa.github.io/isort/
.. _flake8: https://flake8.pycqa.org/

Expand Down
28 changes: 14 additions & 14 deletions docs/first_steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Installation

WeasyPrint |version| depends on:

* Python_ ≥ 3.7.0
* Python_ ≥ 3.8.0
* Pango_ ≥ 1.44.0
* pydyf_ ≥ 0.6.0
* CFFI_ ≥ 0.6
Expand Down Expand Up @@ -70,12 +70,12 @@ in a `virtual environment`_ using `pip`_::
.. _pip: https://pip.pypa.io/


Alpine ≥ 3.12
Alpine ≥ 3.14
+++++++++++++

To install WeasyPrint without a virtualenv, you need the following packages::
To install WeasyPrint using your distribution’s package::

apk add py3-pip py3-pillow py3-cffi py3-brotli gcc musl-dev python3-dev pango
apk add weasyprint

To install WeasyPrint inside a virtualenv using wheels (if possible), you need
the following packages::
Expand All @@ -91,9 +91,9 @@ following packages::
Archlinux
+++++++++

To install WeasyPrint without a virtualenv, you need the following packages::
To install WeasyPrint using your distribution’s package::

pacman -S python-pip pango python-cffi python-pillow python-brotli python-zopfli
pacman -S python-weasyprint

To install WeasyPrint inside a virtualenv using wheels (if possible), you need
the following packages::
Expand All @@ -109,9 +109,9 @@ following packages::
Debian ≥ 11
+++++++++++

To install WeasyPrint without a virtualenv, you need the following packages::
To install WeasyPrint using your distribution’s package::

apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0
apt install weasyprint

To install WeasyPrint inside a virtualenv using wheels (if possible), you need
the following packages::
Expand All @@ -127,9 +127,9 @@ following packages::
Fedora ≥ 34
+++++++++++

To install WeasyPrint without a virtualenv, you need the following packages::
To install WeasyPrint using your distribution’s package::

yum install python-pip python-pillow python-cffi python3-brotli pango
yum install weasyprint

To install WeasyPrint inside a virtualenv using wheels (if possible), you need
the following packages::
Expand All @@ -145,9 +145,9 @@ following packages::
Ubuntu ≥ 20.04
++++++++++++++

To install WeasyPrint without a virtualenv, you need the following packages::
To install WeasyPrint using your distribution’s package::

apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
apt install weasyprint

To install WeasyPrint inside a virtualenv using wheels (if possible), you need
the following packages::
Expand Down Expand Up @@ -472,8 +472,8 @@ to the default fetcher:
def my_fetcher(url):
if url.startswith('graph:'):
graph_data = map(float, url[6:].split(','))
return dict(string=generate_graph(graph_data),
mime_type='image/png')
string = generate_graph(graph_data)
return {'string': string, 'mime_type': 'image/png'}
return default_url_fetcher(url)
source = '<img src="graph:42,10.3,87">'
Expand Down
2 changes: 1 addition & 1 deletion docs/going_further.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The ``formatting_structure.build.build_formatting_structure`` function returns
the box for the root element (and, through its ``children`` attribute, the
whole tree).

.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/master/weasyprint/css/html5_ua.css
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css


Layout
Expand Down
Loading

0 comments on commit e7fd72f

Please sign in to comment.