Subject: Re: our postscript code
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed Jan 31 2001 - 18:04:22 CST
On Wed, 31 Jan 2001, Tomas Frydrych wrote:
>
> While I see that there are good reasons for creating a proper XP
> PS engine, what I am really after at the moment is to be able to
> print out my documents on the same machine where I create them.
> I have been looking at our (Unix) PS code and have made the
> following observations:
>
> (1) we only need the afm files to get the ascent and descent of a
> font and the character widths. All three of these are readily
> available from the X font server, the former two as XFontStruct-
> >ascend, XFontStruct->descend, the third as XCharStruct->width.
> The only other thing that we retrieve from the file, if I am not
> mistaken, is fontname, which we can easily provide as well.
>
> The best thing to do is, I think, to modify
> xap_UnixFont::getMetricsData(), so that if it cannot find the afm
> file, it would get the information from the X font server.
>
Ahh this is great. With this in place we can support a lot more fonts.
Of course for our gtk-framebuffer port we would have to use afm files so
the code should tolerate there being no X-server. ie I think the logic
should be:
Look for afm - use that if present, otherwise grab it off the X server (or
pull it out of gdk)
Cheers
Martin
This archive was generated by hypermail 2b25 : Wed Jan 31 2001 - 18:04:40 CST