Are tspans always necessary?
-
- Posts: 8
- Joined: Fri Mar 25, 2011 5:23 pm
Are tspans always necessary?
Inkscape creates tspan elements inside each text element by default. Perhaps this could be cleaned up? I'm noticing that much of my XML has repetitive tspan elements that mirror their parent text element. Are these really necessary?
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: Are tspans always necessary?
No, their not, as long as you dont want to vary formatting/positioning within the text. tspans let you apply attributes to chunks of the text independently.
if you want you can take the tspan elements out and the text should still render, just all with the properties of the parent text element. (thats my understanding of it anyway)
if you want you can take the tspan elements out and the text should still render, just all with the properties of the parent text element. (thats my understanding of it anyway)
-
- Posts: 8
- Joined: Fri Mar 25, 2011 5:23 pm
Re: Are tspans always necessary?
This should probably be how Inkscape acts by default, only putting in tspans if attributes are applied to chunks of the text.
-
- Posts: 626
- Joined: Wed Jun 06, 2007 2:37 am
Re: Are tspans always necessary?
It gets a lot more complicated tho then as you have to work out if theres a tspan or not etc, if you always put in at least 1 its consistant.
-
- Posts: 8
- Joined: Fri Mar 25, 2011 5:23 pm
Re: Are tspans always necessary?
Wouldn't it be worth saving the space in the filesize? I can't imagine it'd be that difficult to detect whether the text element has a tspan inside...