Do not stop building the metrics file if the unicode index is not found for a kerning entry. In my tests with OpenType fonts provided with Ubuntu, this happened quite often, probably caused by extraneous kerning entries which do not point to valid glyphs.