[cairo] [PATCH] PS/PDF improve efficiency of text output
cworth at cworth.org
Wed Jan 17 13:34:15 PST 2007
[Another reply to a message lost in the mists of time...]
On Sun, 24 Sep 2006 02:25:48 +0930, Adrian Johnson wrote:
> The PDF and PS backends are very inefficient at printing text. These
> patches remove some of the redundancy and help to reduce the size of the
> PS and PDF files generated by cairo.
> The first patch makes the PS show glyphs function look for strings of
> glyphs from the same subset and use either the xshow, yshow, or xyshow
> PS operator to print the glyphs depending on whether the glyphs are
> horizontal, vertical, or neither.
This first patch was pushed out long ago.
> translation matrix created from the x and y operands. The second patch
> will, for the simple case where the text matrix is a diagonal matrix,
> use the Td operator for positioning glyphs.
> The third patch adds a new stream filter type that compresses the stream
> using the zlib deflate method.
> The fourth patch uses the deflate stream in the PDF backend when
> emitting the content stream.
These next three I just pushed out now.
The only objection that had been raised is that Behdad noted that we
(as developers at least---but perhaps users as well) will sometimes
want to get uncompressed, "human readable" PDF for debugging purposes.
So the first person to get annoyed enough by the compression gets to
implement the function to turn it off again, (and we can see there if
it's a cairo maintainer or a user that's getting annoyed).
We still haven't fixed the issues that are preventing text selection
from working with cairo's PDF output. Alp Toker has claimed to have
some work that fixes that. Alp, when can we see that work so it can
get integrated into cairo? Does this set of patches I just pushed help
you clean your stuff up? Or maybe just introduce a whole new wave of
Anyway, I'd still like to get the selection fixed right away so it
will be there as a major feature for the 1.4 release.
PS. Adrian, we haven't seen you on the cairo mailing list much
lately. I hope things are going well. And thanks again for the great
work that you've done, such as this stuff I'm finally committing now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070117/5ec0e37c/attachment.pgp
More information about the cairo