When trying to convert the attached PDF file into PDF, tiff or any other format with the latest GS head i get an /invalidfont error. It works fine however with GS 7.03.
Created attachment 938 [details] PDF file
I confirm that this bug is present in the current CVS version and can be reproduced as: gswin32c foo.pdf
When instantiating a face, TT interpreter fails with TT_Err_ENDF_In_Exec_Stream in Ins_END called indirectly from TT_Set_Instance_CharSizes. Either the font has an invalid TT instructions, or it has a mangled TT table pointers, or we wrongly extract it from the document. 7.03 ignores TT instructions.
The event explaineg in Comment #3 happens with the first execution of ashow, and the first call to TT_Set_Instance_CharSizes, when RunIns calls Instruct_Dispatch[CUR.opcode].p at 499th time. Set a breakpoint at ttinterp.c ln 5180 with skipping 498 times.
Created attachment 944 [details] tttrace.txt Attaching the TT interpreter trace obtained with -ZY. Don't like the unknown instruction INS_$91 near its end.
Running GS-FAPI.FreeType2 (with the patch to zfapi.c committed few minutes ago), the document renders with no problem. So we can trace how FreeType2 instantiates that face.
Interpretation succeeded with copying Ins_UNKNOWN from FreeType2.
Created attachment 945 [details] patch.txt A suggested patch. Need to resolve a possible licensing problem before publicising it.
The patch passed the regression test, but Ralph says that we didn't license FreeType2. So put this on hold until the license is obtained.
Created attachment 947 [details] patch2.txt Well, the specs is in the public domain, and I don't like the code from FreeType2. So I implemented it differently.
Patch http://www.ghostscript.com/pipermail/gs-cvs/2004-October/004908.html