Re: PyDia and Metapost



First, a simple question.  What the heck does the font size in Dia mean?
Visually, a font size (cmr10) of 0.30 looks to be about 10pt on screen
in
Dia.  It comes out about 18pt in LaTeX through MetaPost.  Also, I think
the
positioning issue is as simple as positioning the text using the wrong
vertical reference point (text baseline vs. text box center.)

It means centimeters.

I thought it might, but that assumption did not meet my expectations...

If I create a box in dia 2.54 x 2.54, export MetaPost, pull it into LaTeX,
and print it, it comes out exactly 1 inch square.  Good.  There is no weird
global scaling going on along the way.

[10(pt) / 72.27 (pt/in) ] * 2.54 (cm/in) = 0.351 cm

If I try 0.35, the font is obviously too small.  Trial and error, checking
against a known 10pt source of the same font, I get the best results with
0.45.  (this is with the zoom level set to 100%).

Actually, come to notice it, the font is printing (after MetaPost, PdfLaTeX,
etc) slightly smaller (relative to the surrounding boxes) than it should as
seen on screen in Dia.

This makes me think that Dia is probably handling the font size correctly,
and this is again a problem with the calculation of the MetaPost export
output font size.  (Already shown to be linked to zoom level).

I will go ahead creating my documents with a 0.35 font size, assuming that
we figure out the proper font scaling along the way.

A reference that yielded the 72.27 number for TeX font height...
http://www.oberonplace.com/dtp/fonts/point.htm

I would really like a font size that could be deterministically
controlled.
Set it to 10pt, have it come out 10pt.  Where 72pt is known to be 1 inch
high.  A font size of 0.30 doesn't mean much to me....

There's work on the way to make all measurements unit-aware, but it
hasn't made it into this release.

Sounds good.

            Rob




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