Bug 690118 - Overlapping characters (jk) with ps2write/pdfwrite device on Unix
Summary: Overlapping characters (jk) with ps2write/pdfwrite device on Unix
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Writer (show other bugs)
Version: 8.63
Hardware: PC AIX
: P2 critical
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 02:47 UTC by Subrahmanyan K.H.
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 130
Word Size: ---


Attachments
input.ps (88 bytes, application/postscript)
2008-10-13 02:52 UTC, Subrahmanyan K.H.
Details
output_unix.pdf (9.01 KB, application/pdf)
2008-10-13 02:52 UTC, Subrahmanyan K.H.
Details
output_unix.ps (111.94 KB, application/postscript)
2008-10-13 02:53 UTC, Subrahmanyan K.H.
Details
output_win.ps (105.70 KB, application/postscript)
2008-10-13 02:54 UTC, Subrahmanyan K.H.
Details
patch (1.22 KB, patch)
2008-12-08 22:59 UTC, Marcos H. Woehrmann
Details | Diff
patch (951 bytes, patch)
2008-12-09 06:40 UTC, Marcos H. Woehrmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Subrahmanyan K.H. 2008-10-13 02:47:14 UTC
Hi,

With some of the fonts (mainly Univers, CGTimes) some of the characters seems 
to be overlapping, only on Unix.
whereas on windows everything seems to be fine.

I could see following differences in the output.
The Length in the FontDescriptor is less in case of Unix and the stream has 
some missing info at the end.
-------------------------------------
Windows:
/Length1 14036/Length 11284>>stream
.....
Kf`4%1k6MJ5b1p*:]OL,=4MFq<Lm8mX]Euc=OkAo<Rk;Rc!OK,?e+OO<ZPUL/RDI@@+IbU<`NX1
9kRL4B@^p5<h3r*X]9lWFbfa,f"cb=?igBhJ$<ch!"]6dE*.gE=,#!SJ9W+?VuQg';#gT%"ZTfj
`AE;lFTm:SL[YDthuj5Y"11,eY?b*l(k@,~>
-------------------------------------

Unix:
/Length1 14036/Length 11274>>stream
......
Kf`4%1k6MJ5b1p*:]OL,=4MFq<Lm8mX]Euc=OkAo<Rk;Rc!OK,?e+OO<ZPUL/RDI@@+IbU<`NX1
9kRL4B@^p5<h3r*X]9lZ(W)_ZJ0VtV75Fp'<s=C^"aF;Sp]lB.H@Pu!eIV]acr5YV4B"d[#>eM)
G^f]VH[n@gJ3--%b4X:PnV@G~>
-------------------------------------

I tried on AIX system with the following command:
/hp/os/bin/gs -sDEVICE=ps2write -I/hp/os/lib/FONTS/Unicode/Resource -
I/hp/os/lib/FONTS/Unicode -I/hp/os/lib/FONTS/Soft_Horizons -I/hp/os/lib/PS -q -
dBATCH -dNOPAUSE -dSAFER -dSHORTERRORS -dWRITESYSTEMDICT -dGHOSTSCRIPT -
dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792  -sOutputFile=out.ps -f 
input.ps

The same issue is seen with pdfwrite device also.

I guess the required fonts are already provided as part of other related bugs.

I will attach the input postscript file and the output PS/PDF file.

Thanks
Subbu
Comment 1 Subrahmanyan K.H. 2008-10-13 02:52:06 UTC
Created attachment 4496 [details]
input.ps

simple input PS file 
-----
%!PS

15 500 moveto
/Univers-BoldItalic 20.0 selectfont
(ijk) show

showpage
-----
Comment 2 Subrahmanyan K.H. 2008-10-13 02:52:54 UTC
Created attachment 4497 [details]
output_unix.pdf

output_unix.pdf where we can see 'j' and 'k' are getting overlapped.
Comment 3 Subrahmanyan K.H. 2008-10-13 02:53:42 UTC
Created attachment 4498 [details]
output_unix.ps

output_unix.ps, here we can see the 'j' and 'k' are getting overlapped.
Comment 4 Subrahmanyan K.H. 2008-10-13 02:54:24 UTC
Created attachment 4499 [details]
output_win.ps

output_win.ps, this is the file generated on Windows, here we don't see any
overlapping characters. everything seems to be fine in this.
Comment 5 Subrahmanyan K.H. 2008-10-16 00:11:57 UTC
Hi,

Any update on this case?

Thanks
Subbu
Comment 6 Ken Sharp 2008-10-16 09:06:12 UTC
This one is awaiting attention. I have been moved to a higher priority project
for the forseeable future.

If this is a problem, please contact Artifex to discuss this further.
Comment 7 Subrahmanyan K.H. 2008-10-20 21:09:46 UTC
Hi,

We got a confirmation from our Font vendor that it is not a problem with the 
font and the issue could be that, GhostScript is not handling the placement of 
characters with a negative left side bearing correctly.
In the example: 'j' seems to shift right about the same distance as the 
negative left side bearing. This is a composition, or character positioning 
problem.

Thanks
Subbu
Comment 8 Subrahmanyan K.H. 2008-10-29 20:47:07 UTC
Hi,
Could you please take this defect up?

Thanks
Subbu
Comment 9 Subrahmanyan K.H. 2008-11-12 22:44:38 UTC
Hi,

Any update on this?
This is becoming critical now.

Thanks
Subbu
Comment 10 Subrahmanyan K.H. 2008-11-17 19:06:26 UTC
Hi,

We are waiting for this fix.

Thanks
Subbu
Comment 11 Subrahmanyan K.H. 2008-11-25 18:59:41 UTC
Hi,

Could you please take up this defect.

Thanks
Subbu
Comment 12 Marcos H. Woehrmann 2008-11-26 09:25:52 UTC
Please attach the Univers-BoldItalic font you are using in input.ps.
Comment 13 Subrahmanyan K.H. 2008-11-26 18:47:46 UTC
Hi,
Please find the font in our following ftp site

     ftp://shkal:Patrons9@hprc.external.hp.com/
     ftp://shkal:Patrons9@15.192.32.69/

Thanks
subbu
Comment 14 Marcos H. Woehrmann 2008-11-27 17:58:05 UTC
I can't reproduce this.  I've tried on Solaris 10, Ubuntu Linux 7.10 (on an amd64 system), and Mac OS X 
10.5.5 with Ghostscript 8.62, 8.63, and head (r9246). All produce PDF files that Acrobat 8.0 and 9.0 
read correctly (both display the output_unix.pdf file with the incorrect letter spacing).  

Either it's an AIX only issue or there is another copy of the Univers-BoldItalic font that is being used 
instead of the one referred to in comment #13.

Also, are you sure you are running the same version of Ghostscript on Windows and AIX?  The 
output_unix.ps file you attached is a PostScript  Language Level 3 file, it starts with:

  %!PS-Adobe-3.0

whereas the output_win.ps file is a PostScript 2 file, it starts with:

  %!PS-Adobe-2.0


Finally, can you provide ssh access to an AIX system for testing?
Comment 15 Subrahmanyan K.H. 2008-11-27 23:17:33 UTC
Hi,

Looks like this is AIX only issue.
I don't think I can provide SSH access.

I had given the difference I observed in the output file.

THe difference you observed about %!PS-Adobe-2.0
is not a real problem, in case of unix we had an extra prologue but after that 
you had the same version below.

Thanks
Subbu
Comment 16 Subrahmanyan K.H. 2008-11-30 22:14:45 UTC
Hi,

Just wanted to check if you don't have any AIX sytem to test this out?

Thanks
Subbu
Comment 17 Marcos H. Woehrmann 2008-11-30 22:58:12 UTC
We do not have access to an AIX system.
Comment 18 Subrahmanyan K.H. 2008-12-01 20:25:56 UTC
Would it be possible to check the difference in the output files and see what 
might be happening?

Thanks
Subbu
Comment 19 Subrahmanyan K.H. 2008-12-02 20:02:38 UTC
Hi Marcos,

Since providing the access to our AIX system would be difficult, we are 
thinking of having "Virtual Room Desktop Share" setup and giving control to 
you for analysis.
Please let me know if this okay for you and your convenient time for the same.

Also one thing I observed is that, 
On AIX, with ps2write device there is no overlap in 8.54 version of GS, but 
with 8.63 it does.
But with pdfwrite in both 8.54 and 8.63 I could see the overlap.

And this issue is not there in solaris, linux, windows, everything is find 
here.

Thanks
Subbu
Comment 20 Marcos H. Woehrmann 2008-12-02 23:23:11 UTC
Is Virtual Room Desktop Share similar to using VNC?  If so that would be acceptable; how about Thursday, 
12/04/08 at 11:00 AM PST?  If that time doesn't work I'm available anytime on Friday.
Comment 21 Subrahmanyan K.H. 2008-12-03 21:03:31 UTC
Hi Marcos,

Yes, "Virtual Room Desktop Share" is similar to using VNC.

Sicne 11:00 AM PST would be around 12:30 AM (midnight for me), it would be 
difficult for me and on Friday I will be on leave.
So can we have it on Monday?
Also can we have it during your late evening around 7:00PM (8.30 AM my time)
or your early morning.

Please let me know, I will send out the meeting request with the details.

Thanks for your help.
Subbu
Comment 22 Marcos H. Woehrmann 2008-12-04 09:42:15 UTC
Monday morning your time (i.e. Sunday night my time) would be fine.  Can we do it at 10:00pm my time?  

What software will be I using on my end?  Is there a way of testing it before Monday?
Comment 23 Subrahmanyan K.H. 2008-12-04 17:32:28 UTC
Hi Marcos,

Sunday night 10PM your time, looks good to me.

I will be sending out the URL for the virtual room, no extra softwares are 
required. Using this we can chat also.

You can test your setup using this link
https://www.rooms.hp.com/testsetup

If you are using this for the first time it might install some of the required 
things.

I will send out the meeting request with the dial-in numbers and the virtual 
room URL.

Thanks
Subbu
Comment 24 Marcos H. Woehrmann 2008-12-08 22:59:22 UTC
Created attachment 4647 [details]
patch

Proposed patch for this bug.
Comment 25 Subrahmanyan K.H. 2008-12-08 23:31:24 UTC
Thanks a lot for fix.

One clarification, do we still need this line:

 if_debug2('l', "[l] ushort = %6u  f = %6u\n", (ushort) (sbw[wmode] * factor), 
(ushort) f);

Thanks
Subbu
Comment 26 Marcos H. Woehrmann 2008-12-09 06:40:00 UTC
Created attachment 4648 [details]
patch

Lines that start with if_debug are for debugging and not needed.  You also
don't need the lines between the #if 0 and the #endif.

I've attached a new, minimal patch.
Comment 27 Marcos H. Woehrmann 2008-12-09 09:33:48 UTC
Fixed by r9277.