You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+12
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,26 @@ and [PEP 440](https://www.python.org/dev/peps/pep-0440/).
14
14
- documentation on combining `borb` & `fpdf2`: [Creating a borb.pdf.document.Document from a FPDF instance](https://pyfpdf.github.io/fpdf2/ExistingPDFs.html)
15
15
16
16
### Changed
17
+
-`fname` is now a required parameter for `FPDF.add_font()`
17
18
-`image()` method now insert `.svg` images as PDF paths
19
+
- the [defusedxml](https://pypi.org/project/defusedxml/) package was added as dependency in order to make SVG parsing safer
18
20
- log level of `_substitute_page_number()` has been lowered from `INFO` to `DEBUG`
19
21
20
22
### Fixed
21
23
- a bug in `get_string_width()` with unicode fonts and Markdown enabled,
22
24
resulting in calls to `cell()` / `multi_cell()` with `align="R"` to display nothing - thanks @mcerveny for the fix!
23
25
- a bug with incorrect width calculation of markdown text
24
26
27
+
### Deprecated
28
+
- the font caching mechanism, that used the `pickle` module, has been removed, for security reasons,
29
+
and because it provided little performance, and only for specific use cases - _cf._[issue #345](https://github.com/PyFPDF/fpdf2/issues/345).
30
+
That means that the `font_cache_dir` optional parameter of `fpdf.FPDF` constructor
31
+
and the `uni` optional argument of `FPDF.add_font()` are deprecated.
32
+
The `fpdf.fpdf.load_cache` function has also been removed.
33
+
34
+
To be extra clear: `uni=True` can now be removed from all calls to `FPDF.add_font()`.
35
+
If the value of the `fname` argument passed to `add_font()` ends with `.ttf`, it is considered a TrueType font.
36
+
25
37
## [2.5.0] - 2022-01-22
26
38
### Added
27
39
Thanks to @torque for contributing this massive new feature:
0 commit comments