------ If you just wanted to see some SVGFonts rendering, stop reading, this is not ready yet... ------
I have been working on SVG Fonts and I have recently created a coupe of files (src/display/nr-svgfonts.{cpp,h}) to deal with cairo userfont feature (rendering). It is still incomplete code, of course. I am sending a patch attached to this email. It has several issues:
* Still doesnt render at all :-P (but the cairo userfont callbacks seem to be called properly, so it is a matter of time&pacience to get it working)
* The userfont callbacks are called only once for each glyph. It means cairo is caching my glyphs, which will be a problem when the user modifies them.
* It deals with only one <font> declaration (should be extended to various svgfonts in a single document).
* Currently I have been trying to test this code by calling cairo_set_font_face (ct, nr_svgfonts_get_user_font_face()); cairo_show_text (ct, "A!@A");
But I do not have a proper place to put this call. I have tried to call if from within nr-arena-render-glyphs.cpp, but it is probably wrong.
* Our SVG fonts are not registered to the fontlister nor managed by pango yet.
* We still depend on pango integration so that we can fed pango with our cairo_font_face_t* created by nr_svgfonts_get_user_font_face(). This would be integrated with the current pango code that exists in inkscape.
* I also admit that I need to study a bit more about how inkscape handles units and how these are fed to cairo. Some units&coordinates in this patch are arbirary guesses.
Also, this patch depends on linking inkscape to cairo development branch (git master) which has support for userfonts. That's one of the reasons why this has not been commited to svn yet. I don't want to branch, but I will do it if there's no other option. I would rather prefer to have --enable-svgfonts option in ./configure Can anybody help me with that? I have never done this kind of thing.
cheers,
Juca