[reportlab-users] Font size, baseline and typography stuff

Dinu Gherman gherman at darwin.in-berlin.de
Mon Aug 15 04:08:12 EDT 2011


"Dinu Gherman" <gherman at darwin.in-berlin.de>:


> OTOH, I wrote another test, showing single characters' bound-

> ding boxes and splitting them into glyphs and showing their

> individual bounding boxes, too. See attached script (I'm not

> adding a PDF since I remember some tight size limitations on

> this list...).

>

> I found that for the TT fonts I checked the boxes seemed more

> correct than for the standard Type1 fonts. And I found an

> issue with Unicode when trying to display letters with dia-

> critical marks.

>

> Robin, maybe you can have a look at that? Or point me to the

> list of changes and files I need to download to check myself?


Hi,

I improved my little script illustrating some typography
issues to show now all font glyphs and paths. What I got
are very surprising results. In fact, In some cases the
glyphs used with canvas.drawstring() differ from those
that I get with path.points for the same fontname! This
is most visibly the case at least for Times-Italics. This
seems to happen only for the Type 1 standard fonts, since
none of the TrueType fonts I checked showed this effect.

Now I'm on a Mac and there I could find out that there
are two similar typefaces installed, named "Times" and
"Times New Roman", which correspond perfectly to what I
see from my tests.

So I looked into the file rl_config.py, but it doesn't
help much to find out which font file is really used in
the end when I give a name like "Times-Italics". Is there
any method of finding this out without analysing the
whole code?

Regards,

Dinu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_nanotypometrics.py
Type: text/x-python
Size: 6055 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20110815/74bfffc2/attachment.py>


More information about the reportlab-users mailing list