[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] groff and svg.
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] groff and svg. |
Date: |
Fri, 04 Apr 2003 21:09:51 +0200 (CEST) |
> I have been wanting to make it possible for groff to produce svg
> output for a time now, and I found this ion the net ( freshmeat ) today.
>
> http://www.xsvg.org/
>
> In order to eventually get to a driver for svg, I thought I could
> just make a primitive script to convert groff 'raw' output to
> svg. And then take it from there, does this sound like a reasonable
> way to progress ?
Writing something in C++ might be easier since the interface is
already there.
> I don't know enough about the postscript frontend ( and the X
> frontends ), but have glanced bits and pieces so I would appreciate any
> hints.
It should be rather straightforward:
. Have a look at src/include/printer.h. The member functions in
class `printer' which are tagged with `virtual' can be
reimplemented for the particular device. Functions which look
like
virtual ... = 0;
must be implemented. Default and dummy functions are in
src/libs/libdriver/printer.cc.
. Provide a make_printer() function which returns a new printer
object.
. Additional parameters from the `DESC' file should be scanned in a
handle_unknown_font_command() function which has to be registered
with font::set_unknown_desc_command_handler().
. Additional parameters from a font description file should be
scanned in a handle_unknown_font_command() function which has to
be part of a derived class of `font' (defined in src/include/font.h).
. In main(), call do_file() repeatedly with the file names given on
the command line.
That's all, I think.
Werner