[cairo] [PATCH] PS/PDF improve efficiency of text output

Carl Worth cworth at cworth.org
Wed Jan 24 15:16:58 PST 2007


On Sun, 21 Jan 2007 13:56:31 +1030, Adrian Johnson wrote:
> Carl Worth wrote:
> > 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).
>
> I guess I must be the first person to be inconvenienced. This patch
> adds the function cairo_pdf_debug_disable_compression().

Actually, I think I was the first person to get annoyed by it. I don't
think I had looked closely at any cairo PDF output in months, but
within a few minutes of pushing out the patch that added the
compression, someone pointed out to me that cairo's PDF output
included excess, redundant, and otherwise unnecessary M commands, and
blam, I got annoyed by this inscrutable, compressed output.

Easier than adding a function though, what I did was just:

	git revert b02b86da5c

and that was easy enough that it was how I fixed the excess M bug. If
someone expects to do this enough, one could even do:

	git tag pdf-compression b02b86da5c

and then, whenever you want to get rid of it:

	git revert pdf-compression

But, yeah, adding a temporary commit that you'll have to cleanup
afterwards maybe isn't the best way.

> +/* Functions to be used while debugging (not intended for use in production code) */
> +cairo_public void
> +cairo_pdf_debug_disable_compression (void);

If we don't expect people to actually use this, how about we don't
clutter up our advertised API with it? How about an environment
variable such as CAIRO_DEBUG_DISABLE_COMPRESSION or so?

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070124/5c5bd296/attachment.pgp


More information about the cairo mailing list