
On Wed, Apr 09, 2008 at 12:19:00PM +0200, Jasper van de Gronde wrote:
Instead of making sure that Inkscape knows how to parse/serialize CSS properly, wouldn't it be better to simply use libcroco for all of this? At first glance it seems to provide plenty of functionality.
libcroco doesn't provide property-specific parsing of values[*1], but it does have code to help with parsing a style attribute value into component ‘property:value;’ pairs -- and inkscape uses this code (see sp_style_merge_from_style_string and its call from sp_style_read, in style.cpp).
pjrm.
[*1] Actually, cr-style.c in libcroco does have code for parsing certain HTML properties, but very few of those supported exist in SVG, and about half of even those have different validity rules in SVG compared to HTML, such as whether a unitless number is a valid length.