Discussion:
Illustrator and SVG export
steve stout
2004-05-10 22:12:58 UTC
Permalink
I have a simple question for those of you that use Adobe Illustrator to
export SVG files. Is there a way to make it not create so many <tspan>
tags when dealing with text?

I get output like this...

<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:</tspan><tspan x="15.336" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="25.607" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan><tspan x="47.254" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">-</tspan><tspan
x="53.494" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">9:</tspan><tspan x="68.83" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="79.101" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan>

... when all I would really like is this...

<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:30a-9:30a</tspan>

Yes, I have all of the text in one text box in Illustrator, so that's
not the problem.

Thanks!

.steve
Andreas Neumann
2004-05-10 22:21:39 UTC
Permalink
Hi Steve!

Unfortunately, I don't think there is a way to change that behaviour.

It is because Illustrator wants to accurately export text with kerning. Since
SVG currently (at least not with SVG fonts) supports kerning, they use the
<tspan> with deltax values.

There is one ugly workaround: use a proportional font in Illustrator (such as
Courier) and you won't get the tspans. Later open the file in text-editor and
change the font ... not very nice, but works.

Andreas

PS: you may also contact the Adobe Illustrator team and ask them for an export
option to export text without kerning ...
Post by steve stout
I have a simple question for those of you that use Adobe Illustrator to
export SVG files. Is there a way to make it not create so many <tspan>
tags when dealing with text?
I get output like this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:</tspan><tspan x="15.336" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="25.607" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan><tspan x="47.254" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">-</tspan><tspan
x="53.494" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">9:</tspan><tspan x="68.83" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="79.101" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan>
... when all I would really like is this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:30a-9:30a</tspan>
Yes, I have all of the text in one text box in Illustrator, so that's
not the problem.
Thanks!
.steve
---------------------------------------------------------------------
--
I finally figured out the only reason to be alive is to enjoy it.
-- Rita Mae Brown

----------------------------------------------
Andreas Neumann - Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093 Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: ***@karto.baug.ethz.ch
www: http://www.karto.ethz.ch/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
ananth balasubramanyam
2004-05-11 21:08:07 UTC
Permalink
I had the same issue. What i did was select the text in AI and set
auto-kerning property to 0. this works.
Post by steve stout
I have a simple question for those of you that use Adobe Illustrator to
export SVG files. Is there a way to make it not create so many <tspan>
tags when dealing with text?
I get output like this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:</tspan><tspan x="15.336" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="25.607" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan><tspan x="47.254" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">-</tspan><tspan
x="53.494" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">9:</tspan><tspan x="68.83" y="28.8"
style="font-family:'BaileySansITC-Book'; font-size:24;">3</tspan><tspan
x="79.101" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan>
... when all I would really like is this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:30a-9:30a</tspan>
Yes, I have all of the text in one text box in Illustrator, so that's
not the problem.
Thanks!
.steve
---------------------------------------------------------------------
steve stout
2004-05-11 23:47:34 UTC
Permalink
Awesome... that worked! Thanks!


.steve
Post by ananth balasubramanyam
I had the same issue. What i did was select the text in AI and set
auto-kerning property to 0. this works.
Post by steve stout
I have a simple question for those of you that use Adobe Illustrator to
export SVG files. Is there a way to make it not create so many <tspan>
tags when dealing with text?
I get output like this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:</tspan><tspan x="15.336" y="28.8"
style="font-family:'BaileySansITC-Book';
font-size:24;">3</tspan><tspan
x="25.607" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan><tspan x="47.254" y="28.8"
style="font-family:'BaileySansITC-Book';
font-size:24;">-</tspan><tspan
x="53.494" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">9:</tspan><tspan x="68.83" y="28.8"
style="font-family:'BaileySansITC-Book';
font-size:24;">3</tspan><tspan
x="79.101" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">0a</tspan>
... when all I would really like is this...
<tspan x="0" y="28.8" style="font-family:'BaileySansITC-Book';
font-size:24;">7:30a-9:30a</tspan>
Yes, I have all of the text in one text box in Illustrator, so that's
not the problem.
Thanks!
.steve
---------------------------------------------------------------------
---------------------------------------------------------------------
///---------------------------------------
steve stout
web coordinator
arizona student unions
52o.626.o1o9

http://www.union.arizona.edu

Continue reading on narkive:
Loading...