Hi,
I have been experimenting with adding text-decoration control to the
"Text and Font" dialog. It is working (crudely) except I have not yet
figured out how to remove the
text-decorate property from a "style". That is, to go from:
style="text-decoration: underline wavy
#ffff00;fill:#ffff00;stroke:#006400"
to
style="fill:#ffff00;stroke:#006400"
To add this property, or to modify it, this works:
sp_repr_css_set_property(css, "text-decoration", td_full_string);
and these work:
sp_repr_css_set_property(css, "text-decoration", "none");
sp_repr_css_set_property(css, "text-decoration", "inherit");
putting "text-decoration: none" and "text-decoration: inherit" in the
style. But while this looks like it should have eliminated any mention
of text-decoration from the style:
sp_repr_css_unset_property(css, "text-decoration");
it only succeeded in moving the existing text-decoration from wherever
it was to the end of the style.
In the file src/xml/repr-css.cpp it says that that unset function sets
"inkscape:unset" for that property. Is something else (that I need to
modify?) supposed to see that and then really delete the property? Is
there an sp_repr_css_remove_property() somewhere that I have not found?
Thanks,
David Mathog
mathog@...1176...
Manager, Sequence Analysis Facility, Biology Division, Caltech
Show replies by date
On 14-Jan-2014 14:48, mathog wrote:
Never mind, found the problem.
Another piece of the code was injecting stray
text-decoration="underline"
into the tspan outside of the style, and that was confusing matters
somehow. With those
edited out
sp_repr_css_unset_property(css, "text-decoration");
worked.
Regards,
David Mathog
mathog@...1176...
Manager, Sequence Analysis Facility, Biology Division, Caltech