Repository navigation
v0.3.0
·
45 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changed
- Each SVG image is one Form XObject: an
<img>, an inline<svg>, a CSS image and an<image>inside an
SVG. Its/BBoxis the viewport, and the page paints it withDounder the matrix that places it, so a
PDF reader such as PDFBox or PyMuPDF finds each diagram with its size and position. WeasyPrint drew the
operators straight into the page. The form is no transparency group: it renders as before. The same
image drawn again at the same size, on the pages or within one group, reuses its form. The
form_xobjectargument ofinstall()turns it off. - An SVG background or list marker is clipped at its viewport, as in Chromium: content past it showed.
An inline<svg>withoverflow: visiblestill shows its overflow, and its form box grows to let it through.
Fixed
- SVG text in the generic
monospacefamily alone takes 13px as its medium size, as in Chromium and Firefox:
MathJax writes accented letters as<text font-family="monospace">with no size, and they came out 1.23
times too large. A size from a keyword reads the monospace table of Chromium (largeis 16px), and a size
relative to one (2em,50%,smaller) scales by 13/16 where the family turns monospace and back where
it leaves. A family list (monospace, serif) and an absolute length keep their size. - A tagged PDF (
pdf/ua-1,pdf/a-2a) of an SVG with a<foreignObject>renders: WeasyPrint failed on
the tags of its HTML, which belong to no box of the page. The Figure of the image marks the whole SVG. - A hole in a blurred shape keeps its size: it grew by one sample on each side, so the ring of the lens in
the OpenStreetMap logo came out thinner and its shadow lighter than in Chromium. - The shapes of a theme-aware draw.io export are white, as in Chromium, not black. weasysvg reads the CSS of
an SVG as Chromium does when it prints:@supportsblocks apply when their condition holds, custom
properties andvar()substitute, also in presentation attributes, andlight-dark()takes its light
color. A value thatvar()makes invalid is unset, and an invalid color declaration or attribute is
ignored, so the attribute or the parent value applies. WeasyPrint painted each of these black. Thecss
argument ofinstall()turns it off.
Removed
- Python 3.10, which reaches its end of life in October 2026. Pillow 13.0.0 requires Python 3.11, and it
fixes the vulnerabilities that Dependabot reports for Pillow 12.3.0 in the lock file. - PyPy. No known user runs weasysvg on it, and its CI job took five minutes, the longest of all.
Full changelog: v0.2.0...v0.3.0