Skip to content

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 05 Nov 12:36
· 14 commits to main since this release
Immutable release. Only release title and notes can be modified.

Changed

  • In weasysvg.portable() and the flat SVG, a blur becomes an image of its color with the blurred coverage as
    its alpha, no longer levels of constant opacity. Word drew each level as a ring: the shadow of the
    OpenStreetMap logo and the glare of Tux showed rings. An element that paints a gradient shows it through
    that image as a soft mask. The flat SVG of Tux shrinks from 12.9 MB to 3.7 MB: each level of its blurred
    gradients had cairo write the gradient again. band_px sets the levels of gradients only.
  • In weasysvg.portable(), a fill with a gradient of one color that fades fills each opacity level with that color,
    where a level clipped the shading. A stroke keeps the shading: it paints through a pattern, and Poppler drew such
    levels there washed out, over everything after them. cairo wrote a clip path, a group and a gradient per level, now one path. Word drew
    the clipped levels of the OpenStreetMap lens wrongly: its digits came out sharp and opaque, where Chromium fades
    them.
  • The flat SVG keeps the stops of a gradient that change it, within 0.1 % of a color channel and 0.001 of opacity:
    cairo samples a shading into 257 stops. It rounds the coordinates of a path to two places, of a drawing eight
    times as large. With both, the flat SVG of the OpenStreetMap logo shrinks from 6.6 MB to 2.9 MB, Tux from 3.7 MB
    to 0.46 MB.

Fixed

  • The flat SVG of weasysvg-convert reports why pdftocairo wrote nothing. Killed by the kernel, it said only
    "pdftocairo failed: "; under a memory limit, pdftocairo wrote an empty or cut file, exited with 0 and the flat
    SVG passed. Now each case raises its own ConvertError: the signal, out of memory anywhere in the error output
    (also an abort of Poppler or of C++), no output, and only the first line of the error output, which runs to
    megabytes out of memory.
  • pdftocairo runs with at most 2 GB of address space on POSIX (PDFTOCAIRO_MEMORY). cairo draws a soft mask of a
    rotated radial shading with gigabytes: one such lens of the OpenStreetMap logo took 8.3 GB and 39 s, and the
    whole logo was killed at 21 GB. It fails in a few seconds now. The flattening of weasysvg keeps no such soft
    mask today, and stays under 50 MB.

Full changelog: v0.6.0...v0.6.1