[reportlab-users] pdf-with-embedded-ttf-font-does-not-print

Robin Becker robin at reportlab.com
Wed Mar 7 06:44:07 EST 2018


On 07/03/2018 08:50, Massa, Harald Armin wrote:
> 2018-03-07 9:41 GMT+01:00 Henning von Bargen <H.vonBargen at t-p.com>:

> Anyhow: a solution would be the "convert glyphes to curves", which is one
> of the common workarounds in printing to not be required to embed the
> fonts. The letters are converted into curves.  That may or may not increase
> the PDF size; it makes it much more challenging to index the text inside;
> but it makes it easier to print.
> 
> Could there be an operation to do this in the canvas.save() of reportlab?
> Hard thing to program, but must likely more joyfull than hunting down
> timing issues in a multi-version and multiple-printers windows network.
> 
.....
It's fairly easy to convert characters to curves and then render those. We have some code to do
the conversion in reportlab/graphics/charts/testlabels.py.

It would be much harder to get allthe text output points in the canvas to do the right thing.
Presumably a font that's to be glyphed would need to indicate that to the code in textobject
which would need to actually render in drawingmode and handle all the other actions and text
state changes etc etc.

Assuming we could get the path rendering working there's an issue with the result not being copyable
ie the PDF renderers won't know that the paths even are text so it probably isn't even selectable.
-- 
Robin Becker


More information about the reportlab-users mailing list