Bug 689516 - problem reading PDF: Failed to interpret TT instructions (ref 7814)
Summary: problem reading PDF: Failed to interpret TT instructions (ref 7814)
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Text (show other bugs)
Version: master
Hardware: PC Linux
: P2 normal
Assignee: leonardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 08:16 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer: 700
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2007-10-16 08:16:02 UTC
The customer reports and I've verified that the attached generates an error with
gshead (r8296): 

GPL Ghostscript SVN PRE-RELEASE 8.61: Failed to interpret TT instructions in
font 80000006. Continue ignoring instructions of the font.
Error: /invalidfont in --run--

Both Acrobat Reader (v7.0) and evince display this file correctly, evince does
generate several warnings: "some font thing failed" (even more cryptic than our
messages :-).

The command line I'm using for testing:

  bin/gs -sDEVICE=ppmraw -sOutputFile=test.ppm ./A2.32_Floor_Plan_Level-2x.PDF
Comment 1 Marcos H. Woehrmann 2007-10-16 08:16:32 UTC
Created attachment 3475 [details]
A2.32_Floor_Plan_Level-2x.PDF
Comment 2 Ray Johnston 2007-10-16 10:17:23 UTC
This is probably similar to 689471. 
Comment 3 Marcos H. Woehrmann 2008-03-11 16:38:16 UTC
Per request I'm retesting this customer's bugs:  this one still occurs with r8596.
Comment 4 Henry Stiles 2008-05-20 22:26:25 UTC
support has requested a status update for this problem.  Please add a new
comment entry or send mail to Marcos.
Comment 5 leonardo 2008-05-24 07:06:20 UTC
The test document embeds a TT font, in which  numGlyphs=5 and loca length = 
28. This may be obtained when running  with -ZY. The failed condition is 
gstype42.c ln 518 : 

 if (glyph_index >= pfont->data.trueNumGlyphs)
 	return_error(gs_error_invalidfont);

So I've got an idea how to work around : when loading a font. check if 
numGlyphs is smaller than locaa length. If so< chech whether all loca entries 
are correct. If so, fix numGlyphs and print warning.

I'm not sure that it will work fine, but chances look pretty good. So at this 
point we can talk to the customer that the document is incorrect, and we're 
trying to develop a workaround.
Comment 6 leonardo 2008-05-24 15:09:24 UTC
The suggested change works and passed the regression test with comparefiles, 
so I'll commit it soon.
Comment 7 leonardo 2008-05-25 00:31:16 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2008-May/008354.html