Repository navigation
v0.5.0
·
18 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
- In
weasysvg.portable(), a gradient with transparent stops or a fill opacity needs no soft mask. Its color stays
one shading; the opacity becomes its level sets along the gradient, strips or rings, each painted at a constant
opacity, within 1/64. cairo writes them as SVG gradients under clips, and Word draws the faded gradients of
draw.io. A radial gradient whose circles do not hold each other keeps its soft mask. - In
weasysvg.portable(), a blur and a drop shadow need no soft mask: the levels of the blurred coverage
are filled one over the other, each with a constant opacity, within 1/64 of the blur. The contours come from
the blurred coverage of the shape (levelsets.py), and a rect takes its exact blur, at any size. cairo
keeps them vector in a flat SVG, and Word draws the shadows of draw.io, Mermaid and blockdiag. - A clip path that one PDF clip could not express (a
<use>, several children, an even-odd child, bounding box
units) becomes one path of all its fills, each subpath turned so that nonzero fills their union. It was an alpha
soft mask, which Word does not draw and a printer may rasterize. Text, images, a child with a clip of its own
and a path that crosses itself keep the soft mask. Tux and the Inkscape logo now clip without one. - In
weasysvg.portable(), the blur of a<use>of one shape takes the exact blur of that shape, in any paint:
the glare of Tux, a shape filled with a gradient, needed a soft mask. - In
weasysvg.portable(), a mask of one gray or translucent shape is a clip to the shape and an opacity of the
element. A mask without a white area, or empty, hides the element without a soft mask. - The flat SVG of
weasysvg-convertwrites the opacity of a group as anopacity. cairo writes it as a mask of
one rect over the whole drawing, and Word draws only some masks.
Fixed
- Clip path children that turn opposite ways unite, as in Chromium. WeasyPrint added them to one nonzero path,
which cut a hole where they overlap. - The flat SVG of
weasysvg-convertkeeps the shape of each glyph. cairo writes a glyph as its outline hinted at
the size it is drawn: a bold label of 24 px came out wider and heavier in every viewer. The flat SVG is now
read from a PDF eight times as large, its size still the SVG's own. - A rect without a width or a height casts no shadow and no blur, as in Chromium: in a portable PDF its stroke
made a dot.
Full changelog: v0.4.0...v0.5.0