News
Latest version of CairoSVG is 2.7.1,
released on August 5, 2023
(changelog).
Version 2.5.2
CairoSVG 2.5.2 has been released!
Version 2.5.1
CairoSVG 2.5.1 has been released!
WARNING: this is a security update.
When processing SVG files, CairoSVG was using two regular expressions which are vulnerable to Regular Expression Denial of Service (REDoS).
If an attacker provided a malicious SVG, it could make CairoSVG get stuck processing the file for a very long time.
Other bug fixes:
- Fix marker positions for unclosed paths
- Follow hint when only output_width or output_height is set
- Handle opacity on raster images
- Don’t crash when use tags reference unknown tags
- Take care of the next letter when A/a is replaced by l
- Fix misalignment in node.vertices
Version 2.5.0
CairoSVG 2.5.0 has been released!
- Drop support of Python 3.5, add support of Python 3.9.
- Add EPS export
- Add background-color, negate-colors, and invert-images options
- Improve support for font weights
- Fix opacity of patterns and gradients
- Support auto-start-reverse value for orient
- Draw images contained in defs
- Add Exif transposition support
- Handle dominant-baseline
- Support transform-origin
Version 2.4.2
CairoSVG 2.4.2 has been released!
- Fix race condition in tests
- Fix scale for images with no viewBox
Version 2.4.1
CairoSVG 2.4.1 has been released!
- Fix the –scale parameter
- Allow href attributes with no namespace
- Fix the tree root detection
Version 2.4.0
CairoSVG 2.4.0 has been released!
- Fix aspect and position when resizing root SVG tag
- Follow aspect and position hints when using forced output size
Version 2.3.1
CairoSVG 2.3.1 has been released!
- Fix relative paths on Windows
Version 2.3.0
CairoSVG 2.3.0 has been released!
- Drop Python 3.4 support
- Make text selectable on generated PDF files
- Don’t inherit dx and dy attributes
- Fix support of alignment-baseline=”hanging”
- Fix backslashes in docstrings and comments
- Fix local anchors with files with no given URL
- Close VERSION’s file descriptor
- Clean packaging
- Include LICENSE in distributed packages
Version 2.2.0
CairoSVG 2.2.0 has been released!
- Clean packaging
- Fix T commands used with previous relative commands in paths
- Use real functions for svg2* commands, improving IDE integration
- Fix files management on Windows
- Handle image-rendering property
- Fix crash with some text samples
- Fix position of embedded svg tags with a viewbox not at position (0, 0)
- Add output-width and output-height options
- Handle references to inner document tags defined after the anchor
- Fix offsets for texts on paths
Version 2.1.3
CairoSVG 2.1.3 has been released!
- Fix T commands following q or t in paths
Version 2.1.2
CairoSVG 2.1.2 has been released!
Version 2.1.1
CairoSVG 2.1.0 and 2.1.1 have been released!
- Use cssselect2 and tinycss2 instead of cssselect and tinycss
- Don’t require lxml anymore
- Rely on defusedxml to detect unsafe SVG files
- Use http://www.w3.org/2000/svg as default namespace
Version 2.0.3
CairoSVG 2.0.3 has been released!
- Add
python_requires
in setup.py
Version 2.0.1
CairoSVG 2.0.1 has been released!
- Don’t crash on relative refs with no input URL
Version 2.0.0
CairoSVG 2.0.0 has been released!
2.0.0 is a new major version, its changelog includes:
- Drop Python 2 support
- Drop pycairo support
- Rely on cairocffi, lxml, cssselect, pillow and tinycss
- Fix markers
- Fix URL/id handling
- Use bounding boxes for gradients
- Split deployment and development tests
- Add a scale option
- Add a parent size option
- Test with Travis
Last call before 2.0.0
CairoSVG 2.0.0rc4 has been released today and may be the last release canditate
before 2.0.0. It’s time to test and check that everything is OK for you, dear
users and developers of CairoSVG!
2.0.0 is a new major version, its changelog includes:
- Drop Python 2 support.
- Drop pycairo support.
- Rely on cairocffi, lxml, cssselect, pillow and tinycss.
- Fix markers.
- Fix URL/id handling.
- Use bounding boxes for gradients.
- Split deployment and development tests.
- Test with Travis.
I’d also like to thank the people who took some time to report issues, fix bugs
and add new features. Your tireless help is really appreciated!
CairoSVG 0.5
CairoSVG 0.5 has been released, with exciting new features and a lot of
bugfixes:
- Simple support of the
image
tag thanks to pystacia
- Better tests with pystacia instead of pypng (~35% faster)
- Handle s after C/S and S after c/s in paths
- Handle rounded corners with 2 different radii for rectangles
- Fix python 2.6 support
- Fix markers with empty paths and z/Z points
- Fix initial m in paths with no current point
- Fix transformations order
Don’t expect new features before the next 1.0 version: only documentation and
bugfixes are expected during the next weeks.
CairoSVG 0.4
CairoSVG 0.4 has been released, adding a reliable test suite taken from the
official W3C test
suite.
Another change has been made: tinycss is used instead of cssutils to parse
external CSS files.
The next step is 1.0!
Road to CairoSVG 1.0
Now that CairoSVG has a quite stable API and a lot of features, it’s time to
release a stable version, isn’t it?
So, here’s the road between 0.3 and 1.0:
- Percentages, em and ex units (done);
- Real opacity for groups (done);
- Character rotations;
- Better tests.
The two missing items need a lot of time:
- The
text
module must be totally rewritten to correctly handle paths,
letter spacing and rotation;
- New tests must include unit tests (even included in the docstrings for some
helpers), simple SVG files (to test one specific feature) and complex SVG
files.
If anyone is interested in one of these tasks, you can contact us whenever you
want!