Re: Font Helvetica always used?

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
On 19/06/2015 10:16, Andy Robinson wrote:
> If this is causing printers to complain about embedded fonts, then we
> need some way around the problem.
>
> I wonder if we could internally keep a little set or dictionary of
> fonts that were actually used (by calls to setFont), then remove any
> that are not at the end when writing the PDF?  It would be a lot
> simpler and would involve no API changes or weird setup incantations
> for users.
>
> - Andy
......
in fact it's not the setFont that does the deed it's _make_preamble which we use 
to initialize stuff before anything has been done on a given page. PDF has 
defaults built in so we have to have a font in case we don't use setFont.

We could of course delay setting any font until use in textobject, but I think 
that would complicate things even further.

It would be easier just to make fontname, fontsize & leading available in Canvas 
__init__. If we do that they should be obviously initialization values eg 
initial_fontName,... so there's no confusion with the actual current attributes.
-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.