From: Tony G. <Ton...@Su...> - 2003-02-27 14:40:17
|
Dave Malcolm wrote at 27 Feb 2003 13:48:21 +0000: > I'm considering adding xmlroff support to a Gnome application I'm > working on (www.conglomerate.org). A dream come true. > I'm wondering if there are any plans to support the GnomePrint API > within xmlroff, perhaps as an alternative backend to the PDFlib > backend? As far as I can tell, it would involve refactoring FoDoc > into an abstract base class, with the current implementation as a > subclass (FoDocPDF?), with another subclass talking to a > GnomePrintContext (FoDocGnomePrint?). That is why FoDoc exists. The historical reason why xmlroff uses PDFlib is that when I started, Pango and GnomePrint were a lot further apart than they are today and, considering that the PDF generation should be a minor part of the XSL formatter, I took the path that would get results the quickest and implemented a PDFlib backend for Pango rather than a GnomePrint backend. All I really ever wanted was to be able to pass a PangoLayout to GnomePrint and have it print. Back when Pango and GnomePrint used different font representations and each did its own thing about locating and naming the fonts on the system, passing a PangoLayout to GnomePrint wasn't an option. Now that GnomePrint and Pango are converging on using fontconfig (and FreeType2), it could be done more easily. Note that the fine print on the PangoPDF web pages says that an eventual goal is to use GnomePrint. > This should enable us to get nice Gnome-ified print preview dialogs > etc, and hopefully we could then make both backends optional (my > users are likely to have GnomePrint installed, but not the PDFlib > and PangoPDF libs). But currently you can't just pass a PangoLayout to GnomePrint, can you? > What do you think of this idea? Is it worth me hacking a patch together? More than worth it. Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |