Subject: Re: Rant (Was Re: printing in gnome port)
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Sun Feb 18 2001 - 22:24:31 CST
>Please, please convince us.  :-)  In your opinion what's the Right Way to
>make fonts Just Work?  What work needs to be done where?
Let me start off with stating that my opinion of fonts on X just plain 
sucks. With that said, let me continue with what I feel are possible 
alternatives, improvements, and drawbacks.
>IIRC, to get WYSIWYG printing, we need to have printer metrics for the 
>fonts
>we use, so we can get the on-screen layout calculations right.  To
>reiterate, we need:
>
>   - a font,
>   - printer metrics for that font,
>   - some way of persisting the mapping between the two.
>
>On other OSes, you get all that for free, but when the current solution was
>coded, raw X didn't do that job for us.  Does it now?  Does GTK?  (To save
>Aaron a post, I'll posit that a GNOME-only solution doesn't help.)   Who
>*should* do that job?
GnomePrint does a nice job of this, but as you say, it's isn't horribly 
mature and isn't available in GTK+ only land. It all falls back to "what are 
you willing to settle with and what are you willing to give up?" It's a 
lose-lose situation from all points, as far as I'm concerned.
From X fonts, you can get most (all?) of those metrics that we're interested 
in (bounding boxes come to mind). We'll also (of course) have the font names 
at our disposal. Unfortunately, that means that there isn't necessarily a 
1-1 mapping between the DISPLAY fonts and PS printer fonts. So WYSIWYG isn't 
*necessarily* true, unfortunately. Also (IIRC), all X-fonts aren't 
printable. To recap, it *is* possible to generate PS from what we're given 
without shipping our own fonts. Will it be the same as on the screen? 
Probably, but not 100% necessarily. I'll argue that we aren't 
(unfortunately) a truly WYSIWYG application on any platform *yet*. I'm sure 
I could come up with a large number of testcases to convince you of this. 
There are even some bugs logged in bugzilla to this effect.
Other drawing models have the concept of an abstract graphics class, much 
like our GR_Graphics class. Some even exist on *nix - Java's AWT and the QT 
QPrinter object come to mind. It might be useful to see how these behave and 
perhaps even scour code from them. QT is under the GPL now... What about 
Mozilla?
>PS:  I'll claim that the following issues are peripheral to the current
>discussion:
>
>   - whether to ship fonts at all
>   - which ones to ship
>   - where and how to install them
>
>There are a lot of valid reasons for word processors to ship fonts -- no
>matter what you think of the current reason(s).  :-)
Oh, I totally agree. I just wish that there was some alternative on X to 
manually altering XFS config files and such to get an application like 
abiword to work. And the idea behind X is to be able to remotely exec an 
visual application without hassle. Requiring our own fonts puts a damper on 
this. How does KWord behave? And StarWriter? Mozilla doesn't ship its own 
fonts and does PS output just fine...
If we install new fonts, I'd prefer that they be in some system location so 
that every app on the system could take advantage of them, but there are 
probably some pretty good arguments against this too. Some of our fonts that 
we ship now are pretty old too (~1994 I think).
X-fonts and printing sucks. I'm surprised X-applications can print at all, 
possibly excluding plain-text.
AaronL is supposedly good with PS. My knowledge is fair but I'm always 
willing to learn more (I did some work on gnome-print at one point).
Dom
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
This archive was generated by hypermail 2b25 : Sun Feb 18 2001 - 22:24:41 CST