tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
5.86k stars 502 forks source link

Implement PDF address-field with CanvasAPI #7091

Closed kitsugo closed 3 weeks ago

kitsugo commented 1 month ago

This feature makes the PDFInvoiceRenderer use the CanvasAPI to render the address field of a customer which may include non-ANSI glpyhs.

This allows rendering any glyphs without using PDF CID fonts. The canvas produces an image which we embed into the PDF. We achieve partial accessibility by rendering invisible text below the image in case the canvas was rendered.

If the canvas rendering fails or if there's no need to render with the canvas, the implementation will fall back to normal text rendering.

closes #7075