You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Karen Lease <kl...@club-internet.fr> on 2002/11/30 23:45:26 UTC

Another font-related issue: TTF ascender values

Hi everyone,

Has anyone else noticed that the "ascender" values calculated for some 
TrueType fonts by the TTFReader seem to be very large? I have found this 
at least for the MS versions of Arial. It makes it look like there is a 
lot of leading (line-height) when there is not.

In TTFFile.java, in the method readHorizontalHeader (used to read the 
"hhea" table, there is the following comment.

   ascender = in.readTTFShort();    // Use sTypoAscender in "OS/2 table?

In fact, the ascender values in the OS/2 table are smaller. In the 
OpenType specification, it says that the "hhea" values are 
Macintosh-specific. The commentary seems to indicate that the OS/2 
values are closer to representing the actual font characteristics.

At least for Arial, I certainly prefer the smaller values, but I haven't 
used other TTF fonts. Any opinions on this? If we make the change, it 
will change calculated font values and therefore have an effect on layout.

Regards,
Karen Lease


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org