<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Should we document that the USHORT length field of a format 0 kern
subtable is to be ignored?<br>
<br>
In a 2009 <a
href="http://www.fonttools.org/downloads/TD_2009/OpenType_Status_2009.pdf">presentation</a>
at DTL FontMaster Conference 2009 Dr. Jürgen Willrodt pointed out
that:<br>
<blockquote type="cite">In one of the Vista fonts (Cambria) you can
find a kern table with <br>
one subtable and about 15000 pairs. <br>
The OT spec however has an entry (unsigned short) for the length
of <br>
the subtable which clearly is not correct because you need 6 byte
<br>
for each kerning pair. <br>
At least the specification should be updated that this value is <br>
ignored.</blockquote>
<br>
I just did a check in my Windows 7 machine and, sure enough Cambria
exhibits this condition. As Cambria Regular is a .TTC, I looked at
the kern table in Cambria Bold:<br>
<blockquote>Total length of the 'kern' table: 190446 bytes<br>
Number of subtables: 1<br>
Details of subtable 0:<br>
<blockquote>version: 0<br>
length: 59370 (as declared in the subtable)<br>
format: 0<br>
nPairs: 31738<br>
</blockquote>
</blockquote>
With 31738 pairs, the *actual* subtable length is 6 + 8 + (31738 *
6) for a grand total of 190442. This matches with the total kern
table length when we add the 4 byte table header. Interestingly,
190442 modulo x10000 is, guess what? 59370. So Cambria does the best
it can when trying to stuff an 18 bit number into a USHORT field.<br>
<br>
One might argue that Cambria is in violation of the spec, but I'm
inclined to agree with them that the fmt 0 subtable length field is
superfluous and that we should document it as such.<br>
<br>
Perhaps this has been discussed before on this or other forums, but
I'm just now learning about it.<br>
Regards,<br>
Bob <br>
<br>
<br>
<br>
<blockquote>
<blockquote><br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</body>
</html>