I’m looking for a way to import vector graphics generated in another program (actually by a Matlab scrip) into Illustrator. The difficulty is that I have to find a way to get stroke-width information to illustrator, not just the path. SGV supports stroke-width, but AFAIK there is now way to have the stroke-width change along the path.
Any idea what file format I could use?
I noticed that the latest Version of AI EPS supports this, but I was not able to find specifications for the format and reverse engineering it from a EPS exported from Illustrator does not seem to be easy.
There is no "latest version of AI EPS".
EPS is last century's file format. The last time it has been updated, was in 1997.
An AI-EPS is basically an EPS 3 (from 1997) that has a private data fork. In this private data fork there is an AI file (of the version you specify when saving). The only application that can generate this kind of file is Adobe Illustrator. The only app that can read the embedded AI file is Adobe Illustrator (or more specifically: that version that has been specified).
thanks for the clarification. I already suspected this, as Adobe calls it Illustrator EPS and a single strait line blows up to a AI EPS file with almost 10000 lines instead of 10.
There are no alternatives.
These are proprietary non-standard functions that merely modulate the contours. Since they are programmatic, i.e. based on code and functions their interpretation is entirely up to the program opening/ processing them and re-creating those functions. So technically you could have all the data in an SVG as a blob of custom data, but a browser would still ignore it since it's not part of the actual SVG rendering spec. Rinse repeat for other programs. Maybe Affinity Designer and CorelDraw have learned to interpret this sort of data in their latest versions now that they have similar features implemented, but I'm not up to speed on that, let alone have I ever tried myself. You could download a trial and see if they open your AI files with correct variable width strokes, though. Otherwise the only safe way is to convert this stuff to contours in a controlled fashion inside Illustrator before exporting to whatever format...
thanks for your comment. I want to import into Illustrator.
The idea to ass custom data to a SVG might still be helpful. It would however require to create a custom SVG import plugin for Illustrator. Can this be done?