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: Mon, 24 Nov 2003 12:11:43 +0100 (CET)

> I should receive the copyright assignment paperwork this week, so I
> should be able to send you a working version of the driver soon.

This is very good news!

> grotty (or just -mandoc?) disables headers and footers except for
> the first header and last footer.  I need to re-enable them, if
> possible.

This is a feature of both the man and the mdoc macros: If the .nroff
request has been called, pretend to print to a single, very long page.

> 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.

Using tty-char.tmac is really a last resort since many glyph shapes
are really ugly.  If possible, let the user select the character set.
For example, you could provide an `escp.cfg' configuration file which
is loaded by escp.tmac:

  .\" escp.cfg
  .\"
  .\" Select the character set for the ESCP model.
  .\" Possible values for `escp-charset' are `ascii', `latin1',
  .\" `cp437', ...
  .\"
  .ds escp-charset cp437
  .\"
  .\" Don't let blank line creep in here.

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).

  .fam \*[escp-charset]
  .\" make sure noone actually uses the .fam request
  .rm fam

If the user selects font `R', the font really used is `latin1R'.
Consequently, you have to set up the ESCP fonts like that:

  ascii: asciiR, asciiB, asciiI, asciiBI
  latin1: latin1R, latin1B, latin1I, latin1BI
  ...

To activate this mechanism it is only necessary to add the line

  family ascii

to the escp's DESC file, providing `ascii' as the default.
  

    Werner

reply via email to

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