[cairo] Improving PDF output

Baz brian.ewins at gmail.com
Mon Jan 8 06:54:17 PST 2007


On 07/01/07, Alp Toker <alp at atoker.com> wrote:
>    BT
>    /CairoFont-0-0 1 Tf
>    10.72 0 -0 -10.72 120.032 972.133333 Tm
>    (Version) Tj
>    ET

It strikes me that this would be unneccessary and a lot more efficient
if cairo_show_text(), cairo_text_extents() had the possibility of
dropping into the font backend, instead of always splitting text to
glyphs first. There's the same issue on quartz/atsui, the common case
of just displaying text (rather than warping glyphs) has direct
support in the underlying API.

The PS, PDF backends should translate cairo_show_text into something
just like what you did there. If the caller has got hold of the glyphs
for themselves its likely they were warping/kerning or otherwise
messing with the spacing and your checks would be less likely to work.

Is there a reason why there's no fast path like this? (apart from
there being no patch for it yet :) )

Cheers,
Baz


More information about the cairo mailing list