Skip to content

Releases: Kozea/CairoSVG

2.8.2

15 May 06:57
Compare
Choose a tag to compare
  • Allow both Unicode strings and bytes as input

2.8.1

14 May 12:24
Compare
Choose a tag to compare
  • Allow both text- and bytes-based file objects as input

2.8.0

12 May 11:37
Compare
Choose a tag to compare
  • Drop support of Python 3.7 and 3.8, add support of Python 3.12 and 3.13
  • Optimize math operations
  • Use pathlib
  • Close paths for ellipses and circles
  • Fix output ratio for SVG surfaces
  • Avoid endless loops when updating def attributes
  • Round PNG size
  • Don’t crash when more than 2 values are given to translate and scale functions

2.7.1

05 Aug 09:09
Compare
Choose a tag to compare
  • Don’t draw clipPath when defined after reference
  • Handle evenodd fill rule with gradients and patterns
  • Fix ratio and clip for "image" tags with no size
  • Handle data-URLs in safe mode
  • Use f-strings

2.7.0

20 Mar 14:34
Compare
Choose a tag to compare

WARNING: this is a security update.

When processing SVG files, CairoSVG could access other files online, possibly leading to very long renderings or other security problems.

This feature is now disabled by default. External resources can still be accessed using the "unsafe" or the "url_fetcher" parameter.

2.6.0

12 Jan 16:59
Compare
Choose a tag to compare
  • Drop support of Python 3.5 and 3.6, add support of Python 3.9, 3.10 and 3.11
  • Support crispEdges value for text antialiasing
  • Don’t crash when including CMYK images
  • Only update docstrings when not optimized
  • Don’t restore current point after empty paths
  • Assume that 1ch equals 0.5em
  • Fix various deprecation warnings

2.5.2

06 Mar 15:18
Compare
Choose a tag to compare
  • Fix marker path scale

2.5.1

06 Jan 14:52
Compare
Choose a tag to compare

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

2.5.0

29 Oct 22:59
Compare
Choose a tag to compare
  • 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

2.4.2

13 Sep 15:38
Compare
Choose a tag to compare
  • Fix race condition in tests
  • Fix scale for images with no viewBox