Bug 689083

Summary: PDF embedded TrueType fonts display with wrong characters
Product: Ghostscript Reporter: Ray Johnston <ray.johnston>
Component: PDF InterpreterAssignee: leonardo <leonardo>
Status: NOTIFIED FIXED    
Severity: normal CC: alex
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: 770 Word Size: ---

Description Ray Johnston 2007-02-05 10:36:18 UTC
The attached PDF-file shows the embedded fonts
(on the right hand side in the tables) are not
represented correctly.

The letters do make not any sense at all.

However, using an Acrobat Reader 6 or 7 the text
is readable.

The GS 8.54 version comes up with some warnings about  a cmap
that may be related to the problem
Comment 1 Ray Johnston 2007-02-05 10:41:49 UTC
Created attachment 2737 [details]
005_ABC RDC.pdf

If I "undef" the /Encoding in the pdf_font.ps, then the characters look OK.

This is _NOT_ a fix, just an observation that this is related to the TTF
Encoding (a continuing source of problems). In fact, this experimental patch
produces warnings "Encoding not present.". The diff I used to test with was:

*** lib/pdf_font.ps Fri Feb  2 17:15:44 2007
--- ./pdf_font.ps Mon Feb  5 10:33:02 2007
***************
*** 846,851 ****
--- 846,852 ----
		% Stack: filepos fontres cidfont
    } {
					  % filepos fontres stream
+ 1 index /Encoding undef
      1 index /FontDescriptor oget	    % filepos fontres stream fd
      /Flags get 4 and 0 ne		    % filepos fontres stream
is_symbolic
      dup {
Comment 2 leonardo 2007-02-05 13:00:02 UTC
Possibly a dup of 689079.
Comment 3 leonardo 2007-02-06 02:14:15 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2007-February/007258.html
Comment 4 leonardo 2007-02-06 02:43:15 UTC
I do not confirm that Adobe ignores Encoding. If I damage it in the document, 
Acrobat 7.0 throws errors.