pdf-raku / PDF-Content-raku

Basic PDF content editing and rendering support, including text, images, fonts and general graphics
Artistic License 2.0
2 stars 3 forks source link

Core fonts are being over-shared. #15

Closed dwarring closed 2 years ago

dwarring commented 2 years ago

The core fonts are currently being cached at the process level. Which means that any font-specific encoding differences will accumulate if multiple PDFs are being produced.

This is surprising result if multiple PDF's are being written. There's some chance of the encoding table becoming exhausted if more that 255 glyphs are used from a given font across the processes.

$pdf.core-font should probably cache locally against the PDF.

Not sure yet what to do with $gfx.core-font, but will most likely discourage it.

dwarring commented 2 years ago

Fixed here in 0.6.1 release. Also PDF::Class 0.5.1 and PDF::Lite 0.0.11 releases.

Tweaked examples across these modules to load core fonts via $pdf.