Skip to content

Releases

2.9.1

Choose a tag to compare

@grewn0uille grewn0uille released this 07 Sep 10:37

WARNING: this is a security update.

Specially crafted SVGs with very long paths could lead to exponential rendering times.

  • Support path-like objects for the url parameter
  • Fix support of Windows paths

2.9.0

Choose a tag to compare

@grewn0uille grewn0uille released this 16 Mar 12:08

WARNING: this is a security update.

Using a lot of recursively nested use tags could lead to long rendering times with relatively small inputs.
CairoSVG now stops rendering when more than 100k use tags are rendered.

Using the --unsafe option allows to render larger documents.

  • Drop support of Python 3.9, add support of Python 3.14

2.8.2

Choose a tag to compare

@liZe liZe released this 15 May 06:57
  • Allow both Unicode strings and bytes as input

2.8.1

Choose a tag to compare

@liZe liZe released this 14 May 12:24
  • Allow both text- and bytes-based file objects as input

2.8.0

Choose a tag to compare

@liZe liZe released this 12 May 11:37
  • 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

Choose a tag to compare

@liZe liZe released this 05 Aug 09:09
  • 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

Choose a tag to compare

@liZe liZe released this 20 Mar 14:34

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

Choose a tag to compare

@liZe liZe released this 12 Jan 16:59
  • 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

Choose a tag to compare

@liZe liZe released this 06 Mar 15:18
  • Fix marker path scale

2.5.1

Choose a tag to compare

@liZe liZe released this 06 Jan 14:52

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