2.0.0 (2026-06-16)
Identical to 2.0b1 in terms of code; this release promotes the beta to a
stable release and converts the project documentation files from RST to
Markdown format.
2.0b1 (2026-05-26)
Breaking change — output sizes will differ from 1.x.
svglib now correctly maps SVG user units to ReportLab points using the
standard SVG/CSS conversion factor: 1 px = 0.75 pt (96 dpi). Previous
releases treated 1 user unit as 1 pt, which is 33 % too large. Any SVG
whose width/height or viewBox uses user units or px will
produce a PDF that is 75 % of its previous linear dimensions (same
proportions, correct physical size).
Migration — if you need to preserve the old apparent size, scale the
returned Drawing object before use:
```python
from svglib.svglib import svg2rlg
drawing = svg2rlg("file.svg")
Restore 1.x dimensions (1 user unit → 1 pt, non-spec):
factor = 4 / 3 # 1 / 0.75
drawing.width *= factor
drawing.height *= factor
drawing.scale(factor, factor)
```
- Add support for SVG 2 length units:
rem,vw,vh,vmin,
vmax, andq(quarter-millimetre) inconvertLength(#449). remnow resolves against the root<svg>element'sfont-size
(falling back to the CSS default of 16 px when not set).- Warn when loading SVGs created with Inkscape < 0.92, which used a
non-standard 90 dpi reference resolution (#452). - Move
rlpycairoto thebitmapsextra, so Cairo is no longer part of
the default installation path. - Fix inconsistent unit handling: bare numbers and
pxunits now produce
identical output, as required by the SVG spec (§5.9.2).convertLength
now returns user units (px) instead of ReportLab points; a new
convertLengthToPthelper is used where absolute point values are needed
(font sizes, canvas dimensions) (#439). - Fix SVGs with a
viewBoxbut no explicitwidth/height: the
viewport scale now defaults toPX_TO_PT(0.75) instead of 1, preventing
content from being cropped. - Add support for SVG
linearGradientandradialGradientpaint servers
(#442). - Add support for SVG
<switch>elements with conditional rendering (#441). - Fix
fill-rulehandling for paths by setting ReportLabfillMode
directly (#440). - Fix case-insensitive font family lookup in
FontMap(#433, #435). - Fix fontconfig handling when resolved fonts use non-normal weight or style.
- Improve missing font warnings by pointing users to
register_font(). - Harden
fc-matchcalls by resolving the executable path and passing
arguments after--. - Fixed a SVG path interpretation bug with two successive M or m commands
(#414).