[Fontconfig] Re: [Cairo] Text API proposal

Owen Taylor otaylor at redhat.com
Tue Aug 12 09:08:29 PDT 2003


[ Sending to only the cairo list, since we've away from font issues ]

On Tue, 2003-08-12 at 01:45, Keith Packard wrote:
> Around 23 o'clock on Aug 11, Owen Taylor wrote:
> 
> > 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
> > different.)
> 
> As a first cut, my plan was to simultaneously generate postscript output 
> and render to a page-sized image at printer resolution (mondo huge).  
> Areas which PostScript could acurately render would be drawn with 
> postscript, other areas would be sent as huge images.

Problems here:

 - What *is* the printer resolution? This information isn't always
   available.

 - Rendering at printer resolution is often a waste because printers
   usually can't do their full color or grayscale range at full
   resolution.

 - Mondo huge is *huge* (At a modest resolution of 600dpi, 
   a 8.5x11 page is 128 megs. Not counting temporary group buffers
   that might need to be created.)

> Optimizing that to 
> avoid the huge buffer by saving data in some metafile format might be 
> generally useful, both to avoid the giant pixmap unless necessary and also 
> to permit striping of the output.

Hmm, that might work, though it certainly involves some complexity.

> Hmm.  We could specify a metafile format and require a post-processing 
> stage to convert that for the printer.  In the best of all possible 
> worlds, that format could be PDF...

One note is that any metafile entirely implemented inside Cairo 
should be limited in usage for printing.

I've convinced myself recently that for text display at screen
resolution, you don't want to do the final character=>glyph
conversion until after you know the target output resolution.

Compare the two attached images; the second demonstrates why you
want to be able to take device metrics into account when doing final
positioning of glyphs.

Regards,
					Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfaut-extract-linear.png
Type: image/png
Size: 9024 bytes
Desc: Linear positioning of glyphs
Url : http://lists.freedesktop.org/archives/cairo/attachments/20030812/3c5aaf7c/bfaut-extract-linear.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfaut-extract-adjust.png
Type: image/png
Size: 8326 bytes
Desc: With smart spacing adjustments
Url : http://lists.freedesktop.org/archives/cairo/attachments/20030812/3c5aaf7c/bfaut-extract-adjust.png


More information about the cairo mailing list