[gs-bugs] [Bug 692010] New: CID font render issues, specific to ghostscript

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Mar 2 05:22:46 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=692010

           Summary: CID font render issues, specific to ghostscript
           Product: Ghostscript
           Version: 8.71
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P4
         Component: PDF Interpreter
        AssignedTo: alex.cherepanov at artifex.com
        ReportedBy: ant at symons.net.au
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


Created an attachment (id=7305)
 --> (http://bugs.ghostscript.com/attachment.cgi?id=7305)
example of the rendered pdf document using CID -> ttf replacement

Hi,

This is a followup to http://bugs.ghostscript.com/show_bug.cgi?id=691345

I have taken the advice listed there, done much research and comparison and
have come to the conclusion that I am facing a new issue that does exist in
ghostscript, and thus I have opened this issue.

For the example I am using the gs command line interpreter. I run it on this
pdf with the font substitution for CID font Ariel 



[ant at ant pdf]$ gs fax_doc-01.pdf 
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Loading a TT font from /usr/share/fonts/truetype/arial.ttf to emulate a CID
font Arial ... Done.
>>showpage, press <return> to continue<<

So, immediate thoughts are there is an issue with this pdf encoder.

However, I have read up on the standard, and compared. These tools do all open
the pdf and render the font correctly with no warnings:

adobe acrobat reader 9.4.2 (linux)
evince document viewer on fedora linux 14 v2.32.0
pdftk v1.41 can output the text as an ascii stream correctly

The pdfanalyser demo downloadable from the top of this page:
http://www.pdfanalyzer.com/demo.php
does not report font issues.

It appears to me that this problem only appears on ghostscript (tested with GPL
Ghostscript 8.71 on fedora 14).

This line has been added to
/usr/share/ghostscript/8.71/Resource/Init/cidfmap.GS

/Arial << /SubfontID 0 /CSI [(Artifex) (Unicode) 0] /Path
(/usr/share/fonts/truetype/arial.ttf) /FileType /TrueType >> ;

Perhaps I need to specify an alternate encoding here? Although the other
viewers were able to work without any manual intervention.

If I remove the substitution line I get this output:

[ant at ant pdf]$ gs fax_doc-01.pdf 
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Can't find CID font "Arial".
Substituting CID font /Adobe-Identity for /Arial, see
doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. Will exit with
error.
Error: /undefined in findresource
Operand stack:
   --dict:6/15(L)--   F9   9.96   --dict:6/6(L)--   --dict:6/6(L)--   Arial  
--dict:10/12(ro)(G)--   --nostringval--   CIDFontObject   --dict:8/8(L)--  
--dict:8/8(L)--   Adobe-Identity
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1878   1   3   %oparray_pop  
1877   1   3   %oparray_pop   1861   1   3   %oparray_pop   --nostringval--  
--nostringval--   2   1   1   --nostringval--   %for_pos_int_continue  
--nostringval--   --nostringval--   --nostringval--   --nostringval--  
%array_continue   --nostringval--   false   1   %stopped_push   --nostringval--
  %loop_continue   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   %array_continue  
--nostringval--   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   %loop_continue
Dictionary stack:
   --dict:1150/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--  
--dict:75/200(L)--   --dict:108/127(ro)(G)--   --dict:288/300(ro)(G)--  
--dict:23/25(L)--   --dict:6/8(L)--   --dict:21/40(L)--   --dict:6/15(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.71: Unrecoverable error, exit code 1

<some time later>

I just updated to 9.01, with the same results. With the font remapping:

[ant at ant pdf]$ gs fax_doc-01.pdf 
GPL Ghostscript 9.01 (2011-02-07)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Loading a TT font from /usr/share/fonts/truetype/arial.ttf to emulate a CID
font Arial ... Done.
>>showpage, press <return> to continue<<

The document renders but the text is corrupted. 

Any ideas? How can these other tools render this text correctly or why cant
ghostscript?

Thanks!

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list