Debian Codegraph @

NEWS.rst

raw
1 ======
2 News
3 ======
4
5
6 Version 2.9.1 released on 2026-09-07
7 ====================================
8
9 **WARNING:** this is a security update.
10
11 Specially crafted SVGs with very long paths could lead to exponential rendering times.
12
13 * Support path-like objects for the url parameter
14 * Fix support of Windows paths
15
16
17 Version 2.9.0 released on 2026-03-13
18 ====================================
19
20 **WARNING:** this is a security update.
21
22 Using a lot of recursively nested use tags could lead to long rendering times with
23 relatively small inputs. CairoSVG now stops rendering when more than 100k use tags are
24 rendered.
25
26 Using the --unsafe option allows to render larger documents.
27
28 * Drop support of Python 3.9, add support of Python 3.14
29
30
31 Version 2.8.2 released on 2025-05-15
32 ====================================
33
34 * Allow both Unicode strings and bytes as input
35
36
37 Version 2.8.1 released on 2025-05-14
38 ====================================
39
40 * Allow both text- and bytes-based file objects as input
41
42
43 Version 2.8.0 released on 2025-05-12
44 ====================================
45
46 * Drop support of Python 3.7 and 3.8, add support of Python 3.12 and 3.13
47 * Optimize math operations
48 * Use pathlib
49 * Close paths for ellipses and circles
50 * Fix output ratio for SVG surfaces
51 * Avoid endless loops when updating def attributes
52 * Round PNG size
53 * Don’t crash when more than 2 values are given to translate and scale functions
54
55
56 Version 2.7.1 released on 2023-08-05
57 ====================================
58
59 * Don’t draw clipPath when defined after reference
60 * Handle evenodd fill rule with gradients and patterns
61 * Fix ratio and clip for "image" tags with no size
62 * Handle data-URLs in safe mode
63 * Use f-strings
64
65
66 Version 2.7.0 released on 2023-03-20
67 ====================================
68
69 **WARNING:** this is a security update.
70
71 When processing SVG files, CairoSVG could access other files online, possibly
72 leading to very long renderings or other security problems.
73
74 This feature is now disabled by default. External resources can still be
75 accessed using the "unsafe" or the "url_fetcher" parameter.
76
77
78 Version 2.6.0 released on 2023-01-12
79 ====================================
80
81 * Drop support of Python 3.5 and 3.6, add support of Python 3.9, 3.10 and 3.11
82 * Support crispEdges value for text antialiasing
83 * Don’t crash when including CMYK images
84 * Only update docstrings when not optimized
85 * Don’t restore current point after empty paths
86 * Assume that 1ch equals 0.5em
87 * Fix various deprecation warnings
88
89
90 Version 2.5.2 released on 2021-03-06
91 ====================================
92
93 * Fix marker path scale
94
95
96 Version 2.5.1 released on 2021-01-06
97 ====================================
98
99 **WARNING:** this is a security update.
100
101 When processing SVG files, CairoSVG was using two regular expressions which are
102 vulnerable to Regular Expression Denial of Service (REDoS).
103
104 If an attacker provided a malicious SVG, it could make CairoSVG get stuck
105 processing the file for a very long time.
106
107 Other bug fixes:
108
109 * Fix marker positions for unclosed paths
110 * Follow hint when only output_width or output_height is set
111 * Handle opacity on raster images
112 * Don’t crash when use tags reference unknown tags
113 * Take care of the next letter when A/a is replaced by l
114 * Fix misalignment in node.vertices
115
116
117 Version 2.5.0 released on 2020-10-29
118 ====================================
119
120 * Drop support of Python 3.5, add support of Python 3.9.
121 * Add EPS export
122 * Add background-color, negate-colors, and invert-images options
123 * Improve support for font weights
124 * Fix opacity of patterns and gradients
125 * Support auto-start-reverse value for orient
126 * Draw images contained in defs
127 * Add Exif transposition support
128 * Handle dominant-baseline
129 * Support transform-origin
130
131
132 Version 2.4.2 released on 2019-09-10
133 ====================================
134
135 * Fix race condition in tests
136 * Fix scale for images with no viewBox
137
138
139 Version 2.4.1 released on 2019-08-21
140 ====================================
141
142 * Fix the --scale parameter
143 * Allow href attributes with no namespace
144 * Fix the tree root detection
145
146
147 Version 2.4.0 released on 2019-05-20
148 ====================================
149
150 * Fix aspect and position when resizing root SVG tag
151 * Follow aspect and position hints when using forced output size
152
153
154 Version 2.3.1 released on 2019-04-18
155 ====================================
156
157 * Fix relative paths on Windows
158
159
160 Version 2.3.0 released on 2019-02-08
161 ====================================
162
163 * Drop Python 3.4 support
164 * Make text selectable on generated PDF files
165 * Don't inherit dx and dy attributes
166 * Fix support of alignment-baseline="hanging"
167 * Fix backslashes in docstrings and comments
168 * Fix local anchors with files with no given URL
169 * Close VERSION's file descriptor
170 * Clean packaging
171 * Include LICENSE in distributed packages
172
173
174 Version 2.2.1 released on 2018-09-27
175 ====================================
176
177 * Fix packaging
178
179
180 Version 2.2.0 released on 2018-09-21
181 ====================================
182
183 * Clean packaging
184 * Fix T commands used with previous relative commands in paths
185 * Use real functions for svg2* commands, improving IDE integration
186 * Fix files management on Windows
187 * Handle image-rendering property
188 * Fix crash with some text samples
189 * Fix position of embedded svg tags with a viewbox not at position (0, 0)
190 * Add output-width and output-height options
191 * Handle references to inner document tags defined after the anchor
192 * Fix offsets for texts on paths
193
194
195 Version 2.1.3 released on 2018-01-03
196 ====================================
197
198 * Fix T commands following q or t in paths
199
200
201 Version 2.1.2 released on 2017-12-01
202 ====================================
203
204 * Fix font-size
205
206
207 Version 2.1.1 released on 2017-09-30
208 ====================================
209
210 * Use http://www.w3.org/2000/svg as default namespace
211
212
213 Version 2.1.0 released on 2017-09-30
214 ====================================
215
216 * Use cssselect2 and tinycss2 instead of cssselect and tinycss
217 * Don't require lxml anymore
218 * Rely on defusedxml to detect unsafe SVG files
219
220
221 Version 2.0.3 released on 2017-05-02
222 ====================================
223
224 * Add ``python_requires`` in ``setup.py``
225
226
227 Version 2.0.2 released on 2017-03-20
228 ====================================
229
230 * Handle ``text-align`` in textPath tags
231 * Test with Python 3.6
232
233
234 Version 2.0.1, released on 2017-01-04
235 =====================================
236
237 * Don't crash on relative refs with no input URL
238
239
240 Version 2.0.0, released on 2016-11-24
241 =====================================
242
243 * Drop Python 2 support
244 * Drop pycairo support
245 * Rely on cairocffi, lxml, cssselect, pillow and tinycss
246 * Fix markers
247 * Fix URL/id handling
248 * Use bounding boxes for gradients
249 * Split deployment and development tests
250 * Add a scale option
251 * Add a parent size option
252 * Test with Travis
253
254
255 Version 1.0.22, released on 2016-06-16
256 ======================================
257
258 * Fix crash when lxml is not installed
259
260
261 Version 1.0.21, released on 2016-06-14
262 ======================================
263
264 **WARNING:** this is a security update.
265
266 CairoSVG was vulnerable to XML eXternal Entity (XXE) attacks, this release
267 fixes this vulnerability by not resolving the XML entities anymore.
268
269 The ``--unsafe`` option has been added to force the resolution of XML
270 entities. Obviously, this option is not safe and should only be used with
271 trusted SVG files.
272
273
274 Version 1.0.20, released on 2016-02-23
275 ======================================
276
277 * Allow the user to give parent size
278
279
280 Version 1.0.19, released on 2015-10-30
281 ======================================
282
283 * Drastically improve the performance of ``Node()``
284
285
286 Version 1.0.18, released on 2015-10-20
287 ======================================
288
289 * Use cairo groups to apply filters
290
291
292 Version 1.0.17, released on 2015-10-09
293 ======================================
294
295 * Fix scale and position of markers
296
297
298 Version 1.0.16, released on 2015-08-05
299 ======================================
300
301 * Support the text-rendering property
302
303
304 Version 1.0.15, released on 2015-06-22
305 ======================================
306
307 * Use xMidYMid as default preserveAspectRatio value
308
309
310 Version 1.0.14, released on 2015-06-02
311 ======================================
312
313 * Support the shape-rendering property
314
315
316 Version 1.0.13, released on 2015-02-26
317 ======================================
318
319 * Fix end markers
320
321
322 Version 1.0.12, released on 2015-02-26
323 ======================================
324
325 * Don't crash when paths with markers end with a move_to action
326
327
328 Version 1.0.11, released on 2015-02-11
329 ======================================
330
331 * Allow commas in viewboxes
332
333
334 Version 1.0.10, released on 2015-02-09
335 ======================================
336
337 * Allow quotes around font names
338
339
340 Version 1.0.9, released on 2014-08-12
341 =====================================
342
343 * Don't crash when gradients are applied to paths
344
345
346 Version 1.0.8, released on 2014-07-14
347 =====================================
348
349 * Don't create an atomic layer for transparent tags with no children
350
351
352 Version 1.0.7, released on 2014-05-06
353 =====================================
354
355 * Fix scaling with negative viewBox origin
356 * Automatically detect size and position of circles and ellipses for gradients
357
358
359 Version 1.0.6, released on 2014-03-07
360 =====================================
361
362 * Fall back to pycairo if cairocffi is unable to find the cairo library
363
364
365 Version 1.0.5, released on 2014-03-06
366 =====================================
367
368 * Don't inherit clip* and overflow properties
369 * Don't transform the root svg tag according to the PreservAspectRatio attribute
370 * Add simple support for alignment-baseline
371 * Add cairocffi into setup.py deps
372
373
374 Version 1.0.4, released on 2014-01-21
375 =====================================
376
377 * Clear relative coordinates when absolute coordinates are set in tspan tags
378
379
380 Version 1.0.3, released on 2013-11-27
381 =====================================
382
383 * Fix clips and viewboxes
384 * Don't draw an empty image when locale is not set
385
386
387 Version 1.0.2, released on 2013-11-19
388 =====================================
389
390 * Don't crash when locale is not set
391 * Get the xml_tree from the root parent when creating nodes from string
392
393
394 Version 1.0.1, released on 2013-09-24
395 =====================================
396
397 * Don't crash when svg tag has no width or height
398
399
400 Version 1.0, released on 2013-09-06
401 ===================================
402
403 * CairoCFFI support
404 * Support of more external CSS stylesheets
405 * Handle more filters
406 * Use pillow instead of pystacia
407 * Fix a lot of bugs with text (whitespaces, text on a path, etc.)
408 * Inherit attributes in ``use`` tags
409 * Cache trees for ``use`` tags
410 * Handle conditional structures
411
412
413 Version 0.5, released on 2012-12-13
414 ===================================
415
416 * Simple support of the ``image`` tag thanks to pystacia
417 * Better tests with pystacia instead of pypng (~35% faster)
418 * Handle s after C/S and S after c/s in paths
419 * Handle rounded corners with 2 different radii for rectangles
420 * Fix python 2.6 support
421 * Fix markers with empty paths and z/Z points
422 * Fix initial m in paths with no current point
423 * Fix transformations order
424
425
426 Version 0.4.4, released on 2012-07-05
427 =====================================
428
429 * Use a default font size of 12pt
430 * Fix a bug about non-invertible matrices
431 * Fix the installation for python 3 with LANG=C
432
433
434 Version 0.4.3, released on 2012-05-04
435 =====================================
436
437 * Fix the version detection without cairo
438
439
440 Version 0.4.2, released on 2012-05-04
441 =====================================
442
443 * Don't rely on cairo import to find the version
444
445
446 Version 0.4.1, released on 2012-04-25
447 =====================================
448
449 * Use cssselect
450
451
452 Version 0.4, released on 2012-04-19
453 ===================================
454
455 * Reliable testing suite
456 * Use tinycss instead of cssutils to parse CSS
457
458
459 Version 0.3.1, released on 2012-02-20
460 =====================================
461
462 * Percentages, em and ex units
463 * Real opacity
464
465
466 Version 0.3, released on 2012-01-27
467 ===================================
468
469 * Simple inline CSS support
470 * Support for transformations in patterns and gradients
471 * Real by-surface DPI management (default value set to 96)
472 * Handle exponents
473
474
475 Version 0.2, released on 2012-01-04
476 ===================================
477
478 * **Change the Python API again** to be compatible with 0.1.1 and before:
479 ``svg2pdf(source_as_bytes) -> bytes`` but still support filenames or
480 file objects with keyword-only parameters. See the docstrings.
481 * Add support for ``display``, ``visibility``, ``stop-opacity`` and
482 ``stroke-miterlimit``
483 * Internal refactoring
484
485
486 Version 0.1.2, released on 2011-12-14
487 =====================================
488
489 **Backward incompatible change** in the Python API: previously the input
490 could be either a filename or SVG content as a string. Now a string is always
491 interpreted as a filename, but file-like objects are also accepted.
492 Use a StringIO object if you have SVG content in a string.
493
494
495 Version 0.1.1, released on 2011-12-13
496 =====================================
497
498 Fix Python 2.6 compatibility.
499
500
501 Version 0.1, released on 2011-12-13
502 ===================================
503
504 * First release
505 * PDF, PS and PNG export
506 * Easy installer