Support for soft-hyphens - image() can now insert .svg files - deprecating font caching
Added
- support for soft-hyphen (
\u00ad) break inwrite(),cell()&multi_cell()calls - thanks @oleksii-shyman & @gmischler!
Documentation: Line breaks - new documentation page on Emojis, Symbols & Dingbats
- documentation on combining
borb&fpdf2: Creating a borb.pdf.document.Document from a FPDF instance
Changed
write()now supports soft hyphen characters, thanks to @gmischlerfnameis now a required parameter forFPDF.add_font()image()method now insert.svgimages as PDF paths- the defusedxml package was added as dependency in order to make SVG parsing safer
- log level of
_substitute_page_number()has been lowered fromINFOtoDEBUG
Fixed
- a bug when rendering Markdown and setting a custom
text_colororfill_color - a bug in
get_string_width()with unicode fonts and Markdown enabled,
resulting in calls tocell()/multi_cell()withalign="R"to display nothing - thanks @mcerveny for the fix! - a bug with incorrect width calculation of markdown text
Deprecated
- the font caching mechanism, that used the
picklemodule, has been removed, for security reasons,
and because it provided little performance gain, and only for specific use cases - cf. issue #345.
That means that thefont_cache_diroptional parameter offpdf.FPDFconstructor
and theunioptional argument ofFPDF.add_font()are deprecated.
Thefpdf.fpdf.load_cachefunction has also been removed.
To be extra clear: uni=True can now be removed from all calls to FPDF.add_font().
If the value of the fname argument passed to add_font() ends with .ttf, it is considered a TrueType font.