groff
[Top][All Lists]
Advanced

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

Re: [Groff] groescp update


From: Werner LEMBERG
Subject: Re: [Groff] groescp update
Date: Fri, 02 Jan 2004 05:42:32 +0100 (CET)

> I was using the extended character set of the printer, but this
> isn't portable across printer models: I'll need to use tty-char.tmac
> to provide them, and only use plain ASCII :-( I can't even rely on
> the standard codepages 437 and 850, since these aren't supported on
> every printer (and ISO Latin 1 is very rare).  An escp.tmac which
> includes tty-char.tmac should sort this out.

I've now checked the ESC/P documentation.  Selecting cp437 and some
other code pages is supported by all printers manufactured since 1992.
Selecting international characters is even supported by all printers
after 1981.

So we have two `modes'.

. Printers before 1992 have a single character set, presumably ASCII
  7bit only, where some characters can be exchanged.  We have the
  following additional characters available (restricting to USA,
  France, Germany, UK, Denmark I, Sweden, Italy I, and Spain I, to
  cover even the oldest printers; USA is the same as plain ASCII):

    France:  à ° ç § é ù è ¨
    Germany: Ä Ö Ü ä ö ü ß
    UK:      £
    Denmark: Æ Ø Å æ ø å
    Sweden:  ¤ É
    Italy:   ò ì
    Spain:   ₧ ¡ Ñ ¿ ñ

  This is a subset of cp437 (and latin-1 except the Peseta sign).  The
  ESC/P documentation doesn't say whether characters in the range
  0x00-0x1F are printable.  Since you can switch international
  characters at any place in a document, all of those characters are
  available simultaneously.

. All printers after 1992 support at least cp437 (US), cp850
  (Multilingual), cp860 (Portuguese), cp863 (Canadian-French), and
  cp865 (Norwegian).  Since you can switch any time between code
  pages, the character supported by groff would be the superset of
  those five code pages.

This makes two different groff devices (say, devescp and devescpx) to
be handled by a single driver.  What does your code actually support?

BTW, I don't understand how italics in ESC/P printers work.  It seems
to me that there are two possibilities:

  1. Switching to a real italics font (or rather charset table).  This
     is 7bit ASCII only (with additional international characters I
     assume).

  2. Emulated italics (which should be rather called `slanting').

What is 1. good for?  I'm apparently missing something...

I wrote:

  Then (ab)use groff's family feature to select the proper character
  set in escp.tmac (details can be found in groff's info pages).

I don't think this is necessary now that I've read the ESC/P
documentation :-)


    Werner

reply via email to

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