"all text is output to libnr using livarot types, not using cairo"
Can you explain that in more detail? I'd like to know:
There are probably three components involved:
- The text layout stuff in libnrtype/, which I have described to you already - livarot/, which is a computational library providing curve and shape manipulation, including some of the backend support for rasterisation. The path manipulation parts of livarot are in the process of being rewritten as lib2geom. - display/, which is the controller for rasterising shapes and presenting them to the canvas. Large chunks of this should get replaced by calls to Cairo.
(I might have got some of that wrong: if so, would anybody who knows better please correct me)
So, to answer your questions
- what livarot types are.
Anything in livarot/, most notably Path and Shape, as found in raster_glyph (libnrtype/raster-glyph.h).
- how does livarot distinguish from cairo
livarot ~= lib2geom + bits_of_cairo's_rasterizer
- does that mean we need to replace livarot? How to proceed?
Yes, but that's not your job. The difficulty is that the text code spits out these Path and Shape types, which are not at all conducive to being fed into Cairo. You know that I've flip-flopped repeatedly between whether or not to use Cairo's user fonts at all, and today I'm feeling that you shouldn't. Maybe.
It is interesting to note, however, that you'll have to change the Path/Shape stuff anyway even if you don't go with Cairo because user glyphs can be so much more than just style+outline: they can be entire groups of multicoloured objects.
I may have just flipped back to Cairo during the time I spent writing that paragraph.
"Getting text layout to use Cairo for output rather than libnr."
Can you show me where does that output reside in the code?
libnrtype/FontInstance.cpp, RasterFont.cpp
"Finding a way to get the user font through Pango. One (ugly) possibility which comes to mind is to pretend to be sans-serif while going through Pango and then do a fudge afterwards. Gail asked to be a part of this discussion and she's more knowledgable than I am about cleaner approaches which could be taken here, so I've CCed her"
I'll reply to this one on the thread which includes Behdad.
Richard.