Bug 689740

Summary: Text spacing of zero when rendering PDF file
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PS InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: PC   
OS: Linux   
Customer: 353 Word Size: ---
Attachments: screenshot.png
Chart.pdf
patch

Description Marcos H. Woehrmann 2008-03-06 23:02:31 UTC
Ghostscript renders the text in the attached PDF file with a spacing of zero
(i.e. all the letters are on top of each other), see screenshot.png attached for
the upper left hand corner of the page.  This occurs with every version I
tested, from 8.51 through. head (r8588).  The problem goes away if
-DTextAlphaBits=4 is used.

The command line I'm using:

  bin/gs -sDEVICE=ppmraw -o test.pdf -r300 ./Chart.pdf

Acrobat Reader and evince both read the file okay.
Comment 1 Marcos H. Woehrmann 2008-03-06 23:03:20 UTC
Created attachment 3843 [details]
screenshot.png
Comment 2 Marcos H. Woehrmann 2008-03-06 23:03:30 UTC
Created attachment 3844 [details]
Chart.pdf
Comment 3 Alex Cherepanov 2008-03-09 19:13:30 UTC
Created attachment 3851 [details]
patch

When the font has no /FontBBox but provides character widths through /Metrics
dictionary, use them instead of the calculated widths. The old code did so only

when both widths and side bearings were defined.

This patch extends the changes committed as a rev. 5607 for the bug 687846.
Regression testing shows no differences.
Comment 4 Alex Cherepanov 2008-03-09 19:45:01 UTC
The patch is committed as a rev. 8594.
A simplified test file is added to the sample collection by rev. 8595.