[reportlab-users] PDF size increase from 1.20 to 1.21 or 2.0?

Robin Becker robin at reportlab.com
Thu May 25 13:38:36 EDT 2006

David M. Grimes wrote:
> Robin -
> I'm using both.  I have a platypus story as the "main" interface, but I've 
> developed some of my own Flowables as well which use self.canv (actually this is 
> where I use the TrueType font).
> I see the patch ... I ran a diff from 1.20 to 1.21 - not sure the best fix 
> either at this point :)
>  --Dave

I tried the following add asciiPreload argument to the TTFont class (defaults to 
1 ie the current behaviour). The you can declare your font

font = TTFont('myfont','myfont.ttf',asciiPreload=0) and get the old behaviour ie 
no initial setup of the first subset and nothing special done about the blank 
character. This fixes the 'size' problem, but leaves the problem of text 
justification open, unless we map ' '-->32 in the first subset and ensure we 
never use 32 in other subsets then we'll get spacing issues if ttf is used in a 
justified paragraph.
Robin Becker

More information about the reportlab-users mailing list