[Fontconfig] Re: [Cairo] Text API proposal
otaylor at redhat.com
Mon Aug 11 20:49:43 PDT 2003
On Mon, 2003-08-11 at 19:13, Hans Breuer wrote:
> At 09:24 11.08.03 -0700, Keith Packard wrote:
> >Around 10 o'clock on Jul 30, Owen Taylor wrote:
> >> And for the real API, you need:
> >> - Scale/Apply a transformation matrix to a font
> >> - Render a glyph to a bitmap
> >> - Add a glyph to a cairo path
> >There are two other important operations:
> > - convert a glyph to a path
> The function to use on win32 is GetGlyphOutline. I'm discussing how
> it could be used to make gtk-win32 apps more independent of direct
> Freetype usage in http://bugzilla.gnome.org/show_bug.cgi?id=107668
> > - embed glyphs in a postscript file
> The funtion to use is GetFontData, but I'm not sure if this (producing
> PS files) is really that useful on win32. Remember there is already an
> almost working Device Context abstraction in the platform for a
> long time.
> With it you are not forced to use (expensive) Postscript printers or
> an external program like Ghostcript, but can simply use almost the
> same code to render to display or _any_ printer (with a windoze
> driver) even those ugly GDI only printers which put the burden
> completely on the PC side.
> There is some code of mine which does use it in dia/plug-ins/wmf/wm.cpp
> and dia/app/paginate_gdiprint.cpp both in GNOME cvs.
It's pretty clear to me that writing the printing backends for
Cairo is going to be one of the most challenging part, whether
it's the PS background or using GDI to do printing.
When rendering to the screen, we have a number of things going for
- The number of pixels is pretty low and the bandwidth is high
so if we have to fall back and do stuff as images, we
can do so.
- We know the exact output resolution.
- We can get the pixels back if necessary.
None of this works for a printer. Depending on the version of Postscript
and GDI, one may have a few more features than the other, but neither
is going to be able to handle the full capabilities of Cairo.
(Even with GDI+, the details of Alpha compositing modes, etc, are
Probably Cairo will just have to fall back to sending low resolution
bitmaps of the output to the printer in such cases.
P.S. - I don't think that GS being a separate process really has
anything to do with current deficiencies of printing on Linux;
which are mostly a question of getting nice print setup dialogs.
Spooling to metafiles to allow the printer to keep on printing
after the app exits is, as I seem to recall, a pretty common thing
to do on Windows.
More information about the cairo