Skip to main content
BStorm
Participant
April 9, 2021
Question

Variable font support for SVG Export

  • April 9, 2021
  • 1 reply
  • 722 views

Adobe Illustrator now supports variable font files where all the font style variants are incorporating into a single OpenType file.

 

When exporting a text element in an illustrator file if using a font collection (such as Helvetica) where there are individual font files for different font weights, (thin, regular, medium, bold, ....) the text element is exported as:
 

<text class="cls-12" transform="translate(121.64811 386.60663)"><tspan class="cls-13">A</tspan><tspan x="75.51965" y="0">p</tspan><tspan class="cls-14" x="146.07617" y="0">p</tspan><tspan class="cls-15" x="213.65833" y="0">. 18 t/m 21</tspan></text>
 

which means the text can be modified in the SVG.

If you export a text element that  uses a variable font such as Bahnschrift, the text when exported is exported as an outline (path) rather than text:

<path class="cls-2" d="M154.68914,352.44657l19.79932-33.84668H191.987l-29.124,49.771L140.46014,406.638H122.9616Zm-.18164,18.16456-1.69531-2.84571-29.124-49.16553H141.1867l19.73877,33.36231,2.30078,3.93555L193.319,406.638H175.82049Z"/>

Ideally, the text element should be exported as text and the corresponding CSS is generated with the proper text weight and/or styles. This would ensure that emitted text is editable and be very cool.

 

This topic has been closed for replies.

1 reply

Monika Gause
Community Expert
Community Expert
April 11, 2021

Please post bugs & feature requests to http://illustrator.uservoice.com