[reportlab-users] Getting rid of "Helvetica"

Robin Becker reportlab-users@reportlab.com
Tue, 10 Aug 2004 10:40:55 +0100


Michael Geddert wrote:

> Hello everyone,
> 
> When generating PDFs with the RL OpenSource Toolkit,
> we stumbled over the fact that "Helvetica" is referenced in each and 
> every one of our PDFs,
> even when only other Fonts are used.
> 
> We currently need to get rid of Helvetica  in these cases asap.
> (besides I'm wondering if this behaviour regarding to fonts is 
> TheRightThingToDo anyway ...
> Is there a reason fonts are handled this way ?)
> 
> I've used grep on the sources, looking for something like 
> "unregisterFont", but I was not able
> to find any methods intended to remove a font before the PDFs are 
> written out.
> 
> Is there any way to accomplish this ? Any Clues ?
> 
> 
> Thx & Regards,
> 
> Michael
> 

Are you referring to the standard font. That comes built in and costs little or 
nothing (there's a standard pdf fonts dictionary called 'BasicFonts'). So far as 
I know Helvetica is mentioned in canvas.py as an 'initial font'. I'm not the 
expert on that bit of code and Andy is away on holiday right now. If you 
preferred to set another standard font as 'initial' I'm sure that could be 
accomplished fairly easily.

Can you explain why you want to remove Helvetica?
-- 
Robin Becker