[reportlab-users] overscore spacing issue
timr at probo.com
Mon Feb 27 13:44:57 EST 2006
On Fri, 24 Feb 2006 09:33:27 -0800, Chris Jerdonek <jerdonek at gmail.com>
>Running the below displays a PDF with the multiplication problem 1 x 1
>arranged vertically, with a line underneath the problem. (\x60 is an
>overscore symbol, and \xb4 is the multiplication symbol.)
>In Mac's PDF viewer, the line is correctly right-justified with the
>problem, but in Mac's Adobe Acrobat Professional 6.0.1, the line starts
>underneath the 1 and extends too far over to the right.
You are making some heavy-duty assumptions about the encoding of the
"overscore" glyph. In fact, on a Windows system, the \x60 glyph in the
Symbol font is not centered in its bounding box -- it is shifted WAY far
to the right. The idea is that, if you write an overscore followed by a
letter A, the visual appearance will have the overscore directly above
the letter A, not to the left of it.
For your purposes, you should be computing the actual size of the second
line, and drawing your underline using the line commands. Drawing lines
with underlines or overscores is entirely unreliable.
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the reportlab-users