[cairo] Pango + cairo

mental at rydia.net mental at rydia.net
Tue Mar 15 10:53:54 PST 2005


Quoting Keith Packard <keithp at keithp.com>:

> I'll read through the SVG spec and see whether this is always
> true; it may be that SVG allows applications to request text
> wrapping or embed newlines.

Newlines in SVG text are just whitespace; they don't introduce a new
line:

http://www.w3.org/TR/SVG/text.html#WhiteSpace

However, SVG 1.2 introduces flowing text and graphics, where text
flowing/wrapping is performed according to a specified greedy
algorithm.

http://www.w3.org/TR/SVG12/flow.html

Speaking for Inkscape, we're currently in the progress of
implementing support for this in Inkscape, and we do use pango for
what we can, but I'm fairly certain we ended up having to do line
breaking/wrapping ourselves as the required algorithm is very
different from what Pango wants to do.

(Admittedly, I'm not very personally involved with that part of the
codebase these days so I might be off on some of the details; I'll
CC the list in case anyone more familiar wants to correct me...)

-mental



More information about the cairo mailing list