[reportlab-users] Character placement off - bug or am I using it wrong?

Tim Roberts timr at probo.com
Sun Aug 21 01:55:39 EDT 2022


On 8/20/22 22:42, ellie wrote:

>
> There is also a TTF version which I used, sadly I can't attach it. 

Where did you get it?  My working theory is that the conversion to TTF 
was done incorrectly.


> However, I noticed a screenshot alone works, so I attached that. Look 
> at the "Tw" in "Two" or all the commas, upper render is reportlab 
> placement, lower is with what should be with font kerning working 
> (although due to my hacky approach to override it, maybe some hinting 
> or other details isn't, so it's not 100% correct, just less wrong).

Were both of those generated from the TTF?  Or was one from the OTF?  
Most of the kerning looks just fine.  There are only a couple of 
placements that are bad.  The comma is a bit off, and the "Tw" pair 
could be closer.


> Given the kerning works with a different TTF library with the same 
> font file, I would assume it's kind of out of the question the font 
> contains it. That is why I'm wondering why it doesn't work with 
> reportlab.

What do you mean by "different TTF library"?  How did you generate the 
other sample?  What application?  Same TTF, or was it the OTF?  For that 
matter, what does your Reportlab code look like?  Are you using Platypus 
to do automated layout?


> Is this a bug in reportlab then? Where can I report it with all the 
> files like the font attached? I assume people would kind of hope for 
> something like basic glyph placement in a PDF library to work, so 
> maybe a fix might be worth a consideration.

Now, stand back a minute.  "Basic glyph placement" is just fine. You 
seem to have uncovered a potential kerning issue in a couple of kerning 
pairs in a single font, but you haven't given them nearly enough to work 
with.  At this point, you haven't even convinced me that the problem is 
in Reportlab.  If you can't give them the actual font that fails, how 
can they possibly do any debugging?

-- 

Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list