Testing this in revision 462741, I have created a font file with only two glyphs A and V, and set kerning between them. The XML metrics file (excerpt below) shows that the indexes in <kerning> are glyph indexes, but AFAICS the layout code expects unicode indexes. I'll change that in the TTFFile font decoder class, to have unicode indexes in the <kerning> section. <multibyte-extras> <cid-type>CIDFontType2</cid-type> <default-width>0</default-width> <bfranges> <!-- mapping of glyph indexes to unicode --> <bf gi="0" ue="0" us="0"/> <bf gi="3" ue="65" us="65"/> <bf gi="4" ue="86" us="86"/> <bf gi="0" ue="65535" us="65535"/> </bfranges> <cid-widths start-index="0"> <wx w="684"/> <wx w="1000"/> <wx w="1000"/> <wx w="684"/> <wx w="684"/> </cid-widths> </multibyte-extras> <!-- glyph index 3 is A in my font, 4 is V --> <kerning kpx1="3"> <pair kern="-279" kpx2="4"/> </kerning>
As discussed on the mailing list, this change makes old metrics files incompatible. If implemented, it would be good to add a version number to the metrics file, to detect the incompatibility in case metrics files generated with older FOP versions are used.
See bug #40739 for the metrics-version attribute used to detect older versions of the metrics file.
I now have an IOException saying: Unicode index not found for glyph 1778 for DejaVuSerif.ttf when running TTFReader. DejaVu fonts, see: http://dejavu.sourceforge.net/wiki/index.php/Main_Page
Forget it. I just saw you fixed it already. :-)
Fixed, kerning works in the current trunk
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed