help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ps-print question


From: David Penton
Subject: Re: ps-print question
Date: Thu, 6 Jan 2011 22:56:08 -0500

On 2011-01-04, at 7:20 PM, Peter Dyballa wrote:

> Dave,
> 
> I have an answer from Ghostscript/Artifex. It points to footnote in PRML, the 
> PostScript Language Reference
> Manual (see p785 of the 3rd edition):
> 
>       3. The ISOLatin1Encoding encoding vector deviates from the ISO 8859-1 
> standard in one
>          respect: the character at position 140 is quoteleft, whereas the ISO 
> standard specifies
>          grave. A PostScript program needing to conform exactly to the ISO 
> standard should
>          create a modified encoding vector with this entry changed.
> 
> So what is displayed in the buffer as
> 
>       character: ` (96, #o140, #x60)
> 
> is in reality, printed on some medium or on screen
> 
>       character: ‘ (8216, #o20030, #x2018)
> 
> or: instead of /grave the character /quoteleft is encoded here.
> 
> 
> You can try yourself to open the PS file (any with a `) without any 
> precautions and it will be Unicode or ISO Latin, maybe some ASCII. In a 
> second buffer open the same file–actually a copy, because I don't think that 
> GNU Emacs can display the same file in two different encodings–in 
> adobe-standard-encoding. To do so start with:
> 
>       C-x RET c adobe-standard-encoding RET v
> 
> I assume you are in dired-mode and the text cursor is on the copy. Otherwise 
> you have to use C-x f. Now notice the difference!
> 
> 
> I think of continuing the conversation with the Ghostscript folks (extending 
> to PDF), and I also sent a bug report to the GNU Emacs developers because PS 
> files are *not* opened in a PostScript but some text encoding. With the 
> consequence that folks like you and me think a ` is a ` while it's a ‘...

Peter:

Yes, I discovered that several days ago. You are correct that the problem is 
with the encoding vector. But there is no bug that anyone is likely to fix 
anytime soon. 

The issue is not related to the encoding of the postscript file. In order to 
understand this, you must understand what postscript font encoding vectors are. 
And, as I indicated to you several posts ago, the "problem" is indeed in the 
postscript generated by ps-print. The ps-print code generates postscript that 
intentionally replaces the font's encoding vector with the ISOLatin1 encoding 
vector, which does the "wrong thing" with the grave character.

I suggest that you do a bit of reading in PRML to understand what a font 
encoding vector is. Once you do you will see that the encoding of the ps file 
is not really the problem, although it is possible to get the grave to print by 
textually replacing the grave with the string \221 everywhere. The ISOLatin1 
encoding puts grave at #o221.

I have done my own fix for now, by altering the postscript generated by 
ps-print. My fix involves changing the font encoding vector at octal 140 to map 
it onto the grave character. So I don't care whether anyone fixes it. I suspect 
that this issue has been known for a long time.

- Dave -




reply via email to

[Prev in Thread] Current Thread [Next in Thread]