Re: [Xprint] Re: Xprint observations
On Mon, 8 Dec 2003, Roland Mainz wrote:
> "R (Chandra) Chandrasekhar" wrote:
> > > So there seems to be some incompatibility between AA display and
> > > 'wysiwig' printing through xprint. This could be a fundamental
> > > problem; if so, it would seriously limit the usefulness of xprint.
> > > But I wonder if anyone has been able to set it up in such a way
> > > as to have AA display and 'wysiwig' printing at the same time.
> > I have an interesting footnote to add to your observations.
> > If you install mozilla-browser_1.5-3 and include mozilla-xft_1.5-3 from
> > unstable, and in Mozilla, under Edit/Preferences/Appearance/Fonts,
> > select the fonts serif, sans-serif and monospace, without foundry
> > affiliation (probably from Xft?) you can see rather impressive
> > anti-aliased fonts on-screen and also get good looking serif, sans-serif
> > and monospace printout from Xprint under Mozilla.
> > However, if you change to any other fonts such as, for instance,
> > verdana, the Xprint output will default to courier.
> This may be possible... I am not an Xft expert but AFAIK the font naming
> conventions between Xft and XLFD differ a lot... I've CC:'ed
> email@example.com who wrote recently a patch for Mozilla's PostScript
> module which solved similar issues...
> Would it be possible to write a similar patch (AFAIK the Xft/PS one was
> http://bugzilla.mozilla.org/show_bug.cgi?id=219060 ("Freetype printing
> does not work for Xft build")) for the GTK+/Xlib gfx code in Mozilla
> (e.g. that font prefs from Xft-based Mozilla will work for normal
> XLFD-based Mozilla's, too) ?
Actually, bug 219060 was just to fix the 'infinite-loop' problem in FT2
printing module in Xft+FT2 build. I didn't make any fundamental change
in that bug. (there's another bug I have a patch for that makes a more
significant change in Mozila-FT2's font selection mechanism ). In Xft
build with FT2 enabled, two different font selection algorithms are
used for the screen rendering and printing. For the screen rendering,
fontconfig is used while for printing with FT2, XLFD-based font selection
mechanism *augmented* with direct access to truetype fonts via freetype
library is used. The result is not a very faithful WYSWYG but nonetheless
we can get a pretty good result.
In case of Xprint, its font selection mechanism is entirely based on
XLFD so that it's not easy to get a faithful replica of the screen
rendering by Xft. However, there's a possibility. See bug 211763 (
http://bugzilla.mozilla.org/show_bug.cgi?id=211763). This is to regard
Xprint server as an Xserver with a very high resolution to which Xft
can send its 'rendered' result.
In summary, at the moment, the closest thing possible to WYSWYG print-out
(with Xft build) is to enable freetype printing in Xft build.