Re: Metapost - text alignment



tir, 23 01 2007 kl. 06:20 -0800, skrev Rob McDonald:

The old Metapost export code had issues with precise vertical
placement of text.  This was due to the fact that the Metapost text
writing command used aligned according to the bounding box instead of
the text baseline.  Metapost does have a slightly lower level command
which could be used to fix this problem.  However, if you do so, you
must calculate the horizontal positioning yourself (left justified,
right, centered).  Now would probably be a good time to address this
issue.

(If this problem has already been addressed, I apologize for the noise)

I don't remember the exact details of the fix, but I've posted on it
before.  Search the archives for messages from me, or if you can't
find it, ask me and I'll look it up.

I take it you're thinking of
<http://mail.gnome.org/archives/dia-list/2006-February/msg00114.html>.
Could you extend the example with something that sets the width of the
text?  With draw_textline, that is available for free and is essential
for correct rendering.

-Lars




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]