No Subject



An application that produces multi-page output and that wants page
numbers and headings, etc., on each page is going to have to keep
track of how much goes on each page.  If, for example, you wrote a
internationalised version of pr that wraps input lines when they're
too long to fit on one page, you'd have to count how many output lines
were produced for each input line.

In the GTK+/GNOME world, an easy way to do that is to use Pango to
layout the blocks of text, to keep track of the running total of the
heights of the layouts added to the page, and to start a new page when
adding a new layout will exceed the allowed vertical space on the
page.

That's a simplistic example of using Pango, but it shows Pango used in 
the application, not just in the print system.

The current answer is to use the glyph numbers in Pango's layouts in
gnome-print's glyphlists, but in my experience the glyph numbers don't 
exactly coincide, and nor do the available fonts.

Lauris Kaplinski has twice proposed [1, 2] a Pango version or Pango
implementation that generates glyph lists from rich text.  I would
prefer to see a gnome-print implementation that accepts Pango layouts.

I'm probably splitting hairs, and it may be exactly what Lauris means, 
but if your application is concerned with how much goes on the page,
you just want to worry about the size of the text block, not how to
translate that into terms that the print system understands.  Since
Pango already has multiple rendering contexts, it would be useful if
gnome-print didn't add another one.

Since I'm already indulging in uninvited speculation about future
gnome-print APIs, it would also be useful if "gnome-print acting as
lpr" (i.e. where the application isn't dealing with individual pages)
could accept Pango-style markup for setting text attributes.

Regards,


Tony Graham
------------------------------------------------------------------------
Tony Graham                           mailto:tony.graham@ireland.sun.com
Sun Microsystems Ireland Ltd                       Phone: +353 1 8199708
Hamilton House, East Point Business Park, Dublin 3            x(70)19708


[1] http://lists.ximian.com/archives/public/gnome-print/2001-May/000639.html
[2] http://lists.ximian.com/archives/public/gnome-print/2001-May/000650.html




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]