Re: Some advice please..


Subject: Re: Some advice please..
sterwill@abisource.com
Date: Mon Dec 20 1999 - 20:44:58 CST


Leonard Rosenthol wrote:
> Can I assume from the name of that file, that the PS
> generator is ONLY available for Unix?

Right now, because of a true bug in the tree layout, the PostScript
generator is only available in the Unix builds. The PostScript
graphics context, however, is very plain C and C++, mostly string
emissions to a file descriptor. There are a few calls to g_snprintf
(glib's snprintf) that will need to be generalized before it's
just ANSI/ISO C and C+.

Moving the PostScript capabilities to abi/src/af/gr/xp (where they should
be) is easy, but making use of them in AbiWord for Win32 will require a bit
more thought. There is this larger problem of fonts; AbiWord on Unix
always has Type 1 fonts (and their metric files) available locally
for PostScript printing. Windows makes no such checks, since it can
draw and print (using the native Win32 printing DC) using Windows
TrueType fonts.

Someone will need to restructure the font logic in the PostScript
classes to optionally embed fonts, instead of always doing it (which
is its default behavior). This feature will be very nice to have
on Unix too, but there's some font face matching logic that has to
go into it first. When AbiWord on Win32 wants to make PostScript,
it needs to know the metrics of the Adobe fonts it will be referencing
in its output. I have seen some of these (freely available; hopefully
freely redistributable) official Adobe font metrics floating around
on the net.

Also, if your document has (for example) "Palladio" text in it ("Palladio"
is a copy of the popular "Palatino" font) what resource do you name in your
PostScript? One needs to know which fonts are in stanrdard PostScript
printers. No one here has done the research to make some good mappings.

> I ask because I'd like to add PDF exporting capabilities to
> AbiWord at some point, and the easiest way to do that (since you've
> already got PS generation) is to simply pipe the PS through
> Distiller/Ghostscript/PStill/etc. But I'd want/need the PS generator
> for the other platforms as well...How out of luck am I?

I think the bulk of the work is already done. I'll be glad to help get
the PostScript code over where it should belong (abi/src/af/gr/xp) if you'd
like to use this on non-Unix platforms. Another thing that we'll have
to work out is the Win32 interface for exporting PostScript. The Unix
print dialog lets one pick a file and a type when printing to file (that's
where the user can select PostScript 2.0). Windows handles its own
printing throgh a common dialog. Can we easily merge this feature into
this dialog?

Pondering the dialog also has me wondering about something. I'm not very
familiar with DTP tricks on Windows, but I know Windows (when given
PostScript printer drivers) will generate PostScript from Windows printer
DC calls (that would be how it prints). Are these drivers very proprietary,
or otherwise unavailable to people who don't own PostScript printers?
I would think by now someone would have written a simple Windows print DC
-> PostScript driver for everyone to use.

-- 
Shaw Terwilliger



This archive was generated by hypermail 2b25 : Mon Dec 20 1999 - 20:44:59 CST