Well since we don't look at the AFM file ...

-phil.

Peter B. West wrote:
We have noticed some oddity in the measurement of Type 1 fonts.
Generally speaking, the logical bounds of characters in Type1 fonts
seems to be slightly smaller than the width given in the AFM file for
that font.

As an example, I have used the luxirr.ttf serif font, converting it to a
pfb file with a corresponding afm, using the wonderful FontForge by
George Williams.

When I get the metrics or, for example "A" from the ttf file, I get a
width of 1479 in an em box of 2048 square. That is, the single-point
logical width is 1479/2048, or .7221679687.

Obtaining a GlyphVector from the single character "A" results in the
following measures of logical and visual bounds.

visual
 java.awt.geom.Rectangle2D$Float[x=0.0,y=-0.734375,w=0.71875,h=0.734375]
logical
 java.awt.geom.Rectangle2D
$Float[x=0.0,y=-0.9926758,w=0.72216797,h=1.2036133]

The logical width matches the measurement of the font in FontForge.

Converting the font to a pfb on a 1000 unit em box gives a width of 722,
reflected in the afm file. Running the same test program using the Type1
file gives:

visual
 java.awt.geom.Rectangle2D$Float[x=0.0,y=-0.734375,w=0.71875,h=0.734375]
logical
 java.awt.geom.Rectangle2D
$Float[x=0.0,y=-0.75279236,w=0.716095,h=0.9918213]

The width is .716095. This shrinkage is consistent with observations of
other Type1 files, which have not been converted from ttf, e.g. Adobe's
SY______.PFB Symbol font.

Peter

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to