RE: Metapost - text alignment

Hmmm, my only testing has been with the test documents 
attached to the 
bug 332544. Do you have a simple example you could send me or attach 
to the bug report and I'll get it to work too?

It is hardly worth posting an example.  Just create some text 
in cmr10 and set the size to 0.35.  If your change makes it 
output 'scaled 0.67'  (approximately 2.05/3.0) then we have a 
problem.  If it still outputs 'scaled 1.05' then everything is normal.

OK, I've updated the test cases attached to the bug 332554 (sorry for getting the
number wrong before)

The new test case has cmr, serif, sans and monospace. As a result I've
updated the patch to try to fit those font sizes.

Unfortuntely there seems to be such a difference in the fonts used that
the scaling is quite different for them all. I like Lars' idea of
getting LaTex to fit the text to the given width using kerning, but it's
just so way out at the moment that this will cause problems. Maybe the
font name matching needs improving instead?

As an aside, I note that the error in the text scaling is non linear -
it changes depending on the font size. This seems to be a font dependant
characteristic - it occurs in Dia and MetaPost. The attached example has
font size 2, 1, 0.5, 0.25 for three font styles. The .png shows what it
looks like in Dia, and .pdf via metapost export (with the latest patch
to bug 332554).


Attachment: TextTestWidth.tar.gz
Description: TextTestWidth.tar.gz

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