Bug 687603

Summary: vertical text misplaced after distilling
Product: Ghostscript Reporter: Jack Moffitt <jack>
Component: PDF WriterAssignee: Igor Melichev <igor.melichev>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: 310 Word Size: ---
Attachments: vertical.ps
v2.ps

Description Jack Moffitt 2004-07-28 14:15:54 UTC
Processing the attached customer file with pdfwrite results in the vertical text
on page two being out of the boxes.
Comment 1 Jack Moffitt 2004-07-28 14:20:00 UTC
Created attachment 822 [details]
vertical.ps
Comment 2 Igor Melichev 2004-07-29 12:55:52 UTC
Reproduced with CVS HEAD.
Comment 3 Igor Melichev 2004-08-02 12:15:55 UTC
It uses a composite font with FontMatrix [0 a a 0 0 0], and its descendent 
CIDFontType 2 font has another transposed FontMatrix [0 1 -1 0 0 0]. They more 
or less compensate each another, except for V-vector. When we write a 
CIDFontType2 to PDF, actually we write a True Type, which has no FontMatrix. So 
likely we wrongly translate V-vector. I tried some changes to code, but could 
not find a right one before vacations. Likely a code near gdevpdte.c ln 844 to 
be changed. BTW, it looks that the 1st and the 2nd matrices are applied in a 
wrong order.
Comment 4 Igor Melichev 2004-08-18 07:24:32 UTC
The previous comment isn't fully correct.
Actually the problem happens due to the written text positioning commands are 
inconsistent with DW2. 
Comment 6 Jeong Kim 2004-08-18 22:55:51 UTC
I found another problem with new patch.
When you distill the attached file (v2.ps) with Acrobat, you can see all the 
letters are in a box. However, when distilling with the latest gs cvs head, a 
letter is out of the box and some letter spacings are not correct.
Comment 7 Jeong Kim 2004-08-18 22:58:34 UTC
Created attachment 859 [details]
v2.ps
Comment 8 Igor Melichev 2004-08-24 02:31:37 UTC
Neither Acrobat Distiller 6.0 nor CPSI 1030 could handle v2.ps on my system 
Windows XP. Both fail with "Error: rangecheck; OffendingCommand: endcidrange ". 
I re-close this bug because it originally was a customer bug, which is fixed. 
Jeong, if you still have a problem, please open another bug and attach all 
necessary information how to reproduce it, including the Acrobat version, 
platform, and check whether it uses a platform-specific resources. Please also 
attach the PDF file created on your system with Acrobat.
Comment 9 Igor Melichev 2004-10-19 16:16:05 UTC
Reopening the bug, because comparefiles/Bug687603.ps still displays some 
characters biased. Rather they are inside boxes, hieroglyphs are biased by X 
from letters.
Comment 10 Igor Melichev 2004-10-20 09:02:03 UTC
More patch to HEAD :
http://www.ghostscript.com/pipermail/gs-cvs/2004-October/004937.html