On 23-Jul-2015 13:33, Marc Jeanmougin wrote:
Hi all,
when looking at https://bugs.launchpad.net/inkscape/+bug/1477723 (Cannot style spaces in text + Styling spaces moves them to next tspan) that a friend mentioned to me*, i found the cause of it in a very old function: tidy_operator_styled_whitespace http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/text-editing.cpp#L1835
This function is one of several that try to "tidy" text trees, doing the following transformations (or attempts to do so**) : abc<font> </font>def -> abc<font></font> def abc<b><i>def</i> </b>ghi -> abc<b><i>def</i></b> ghi
This transformation is exactly what should not be happening in my case (there is imo no reason for not being able to style spaces, especially when doing so changes space width), so *I plan to remove it entirely.*
Does someone have any objections?
Text decorations currently operate on white space, so that underline or strike through can mark up white space, not just visible characters. Be careful when you poke around in those tidy routines as moving a space out of a pair of bounding text decoration tags would break that. The attached small SVG is a text decoration example - modify it to match the cases you are changing and verify that the decorations are not lost.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech