[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: ESC/P2 printer driver
From: |
Roger Leigh |
Subject: |
Re: [Groff] Re: ESC/P2 printer driver |
Date: |
Sun, 02 Nov 2003 19:08:03 +0000 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Werner LEMBERG <address@hidden> writes:
> Sorry for the late reply. For stupid reasons I haven't received mail
> from the groff mailing list for some months.
No problem! I've been quite busy, so I've not done much up until now.
>> The ESC/P driver would be quite a simple driver. All I want in this
>> case is an 80 col x 60 line extended ASCII output with bold, italics
>> etc. This could probably be based on grotty.
>
> Yes, this seems a natural choice.
So far, I've taken tty.cpp and stripped out:
* All colour handling
* Inverse video and other terminal-specific code
* All of the old_drawing_scheme stuff
I've then replaced the SGR escape formatting codes with ESC/P codes.
All it now needs is some device set-up/clean-up stuff, and it should
work.
What is the project policy WRT the C++ Standard Library, templates and
namespaces? Is it OK to use std::string, std::vector etc? I noticed
ptable.h uses macros where templates could be used to make the code
cleaner (you might even be able to use std::map internally), i.e.:
template<typename T>
class ptable {
std::map<std::string, typename T> m_table;
};
>> I've had a look in detail at the grotty driver, and I'm now starting
>> to look at the grolj4 driver. AFAICT I need to write a DESC file,
>> font metrics for each supported font (I'm trying to get these from
>> Epson for their proportional typefaces) and possibly a roff file in
>> addition.
>
> Right.
A question here:
In the font file (font/devescp/R.proto) I have specified the numeric
codes for a whole set of characters, including accented chars,
symbols, Greek and mathematical symbols using the two-letter symbol
code, for example:
~n 24 0 0244
Do I also need to specify an additional line, like this:
ñ "
for the latin-1 equivalent, or will groff convert automatically? What
happens with utf-8 input?
Another thing the printer provides is a whole set of line drawing
characters. I should be able to use those by replacing the unicode
line drawing chars in crossings[] etc.
One thing I'm unsure how to implement are some of the special
character sets the printer supports. By loading selecting different
country codes in the printer, a series of ASCII codes become different
characters (e.g. # -> £, ] -> Å). They have the same number, however,
so I can't put them in the DESC file. To access one of these chars
means selecting a non-US country, printing the code, and then
selecting US again. What is the best way to accomplish this? Some
printers also have multiple selectable [entire] character sets.
tty.tmac contains a some macros I want, but it also has some I need to
redefine or unset. If I create an escp.tmac and include tty.tmac in
this, will this get loaded automatically when I use -Tescp as the
output device?
I've attached a preliminary copy of what I've done so far. Does this
look OK WRT the Makefile changes etc.?
Many thanks,
Roger
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
groff-groescp-preliminary.diff.bz2
Description: groescp driver (incomplete preliminary version)
- Re: [Groff] Re: ESC/P2 printer driver,
Roger Leigh <=