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

Behdad Esfahbod behdad at behdad.org
Wed Oct 25 15:14:40 PDT 2006

On Wed, 2006-10-25 at 23:19 +0930, Adrian Johnson wrote:
> Behdad Esfahbod wrote:
> > Looks good.  Minor comments follow, but other than that I think you
> > should go ahead and push this.  Better commit a not-perfect-yet patch
> > and get testing rather than letting it rot.
> I'll update to include your comments then commit.
> >> +#define MAX_GLYPHS_PER_SHOW  36
> > 
> > I'm not sure I understand why this is needed.  Can't a hex encoded
> > string be wrapped?  It works with ghostscript at least.
> As each glyph position after the first is specified by the displacement
> from the previous glyph, would it be possible for a rounding error in
> the conversion from the displacement to the PS interpreter's internal
> representation to be large enough that very long xyshow strings have a
> noticeable error in the position of the last glyph?

Good point.  In reality that's not going to happen since no user of
cairo I know uses a single show_glyphs operation for multiple lines.
But doesn't hurt.

What about defining procedures for xshow, yshow, and xyshow?  Sx, Sy,
Sxy?  Or whatever the PDF equivalents are.


"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"

More information about the cairo mailing list