all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Penton <djp@arqux.com>
To: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: GNU Emacs List <help-gnu-emacs@gnu.org>
Subject: Re: ps-print question
Date: Thu, 6 Jan 2011 22:56:08 -0500	[thread overview]
Message-ID: <00C210D4-0141-4429-939B-7CAAE6C9A671@arqux.com> (raw)
In-Reply-To: <AEAD680D-4983-40E1-B09A-7CFF6701B5C6@Web.DE>


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	other threads:[~2011-01-07  3:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31  7:22 ps-print question David Penton
2010-12-31  7:33 ` David Penton
2010-12-31  9:22 ` Peter Dyballa
2010-12-31 14:02   ` David Penton
2010-12-31 14:44     ` Peter Dyballa
2011-01-01  2:07     ` David Penton
2011-01-01 20:55       ` Peter Dyballa
2011-01-02  0:43         ` Peter Dyballa
2011-01-02 21:20           ` David Penton
2011-01-03  0:22             ` Peter Dyballa
2011-01-03  2:19               ` David Penton
2011-01-03 13:15                 ` Peter Dyballa
2011-01-03 14:25                   ` David Penton
2011-01-03 18:02                     ` Peter Dyballa
2011-01-03 23:43                     ` Peter Dyballa
2011-01-05  0:20                     ` Peter Dyballa
2011-01-07  3:56                       ` David Penton [this message]
2011-01-07 10:28                         ` Peter Dyballa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00C210D4-0141-4429-939B-7CAAE6C9A671@arqux.com \
    --to=djp@arqux.com \
    --cc=Peter_Dyballa@Web.DE \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.