Details
Description
Zend_Pdf fails with some freware barcode fonts (http://www.squaregear.net/fonts/free3of9.shtml).
It throws an exception:
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Glyph number is out of range: 81' in /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Resource/Font.php:477 Stack trace: #0 /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Resource/Font/OpenType.php(147): Zend_Pdf_Resource_Font->widthsForGlyphs(Array) #1 /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Resource/Font/OpenType/TrueType.php(53): Zend_Pdf_Resource_Font_OpenType->__construct(Object(Zend_Pdf_FileParser_Font_OpenType_TrueType), 0) #2 /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Font.php(720): Zend_Pdf_Resource_Font_OpenType_TrueType->__construct(Object(Zend_Pdf_FileParser_Font_OpenType_TrueType), 0) #3 /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Font.php(637): Zend_Pdf_Font::_extractTrueTypeFont(Object(Zend_Pdf_FileParserDataSource_File), 0) #4 /home/cawa/ZendFramework/laboratory/Pdf/BarCodeFonts/test1.php(15): Zend_Pdf_Font::fontWithPath('./FRE3OF9X.TTF') #5 {main} thrown in /home/cawa/ZendFramework/trunk/library/Zend/Pdf/Resource/Font.php on line 477
The interesting thing is that if this font is converted to another format and then back to the TTF, then it works proper.
An example of converted font