[cairo] Re: [PATCH] PS/PDF improve efficiency of text output
Behdad Esfahbod
behdad at behdad.org
Sat Oct 21 14:38:23 PDT 2006
Hi Adrian,
I was making Firefox print using Pango and when looking at your
xshow/yshow/xyshow patch I think I've found a minor bug. Namely, the
advance vector passed to xshow/yshow should be the same length as the
glyph vector, but your code generates one that is one entry shorter.
I'm referring to this patch:
http://lists.freedesktop.org/archives/cairo/2006-September/007930.html
Of course for positioning purposes n-1 entries are enough to position n
glyphs, but the n'th entry is needed to correctly advance the current
position and while ghostscript doesn't warn or err about it, the HP
Laserjet printer I was testing with refused to print any such
PostScript. Adding a final 0 (and two zeros in case of xyshow) should
fix it. Or you can be smarter and use this feature to eliminate the
moveto when switching between subfonts.
--
behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
More information about the cairo
mailing list