Over at #Inkscape, we are currently reverse-engineering the file format of Adobe #Illustrator so that we can natively read those files. We’re making good progress, but let me tell you…

.ai files are by a wide margin the most convoluted, confusing, redundant mess I have had the displeasure of working with.

But that‘s what you get when you have 40 years of historical cruft, with no conscious effort of maintaining consistency. We should not make the same mistake with our additions to #SVG.

Today‘s favorite discovery: it is mathematically impossible to place a radial gradient exactly at the corner of a rectangle in Illustrator.

The gradient is defined by its position (x,y) and its length l. But that’s not actually the radius of the gradient. To get that, you have to transform the rectangle to a 1x1 square centered at the origin, then measure the distance between (x,y) and the nearest corner and multiply with l to get the radius (then transform back).

But if (x,y) is the corner, you multiply l with 0 - so you cannot have a gradient radius larger than 0 in that case!
If my file format adventures are interesting to so many people, I should prepare a #FOSDEM talk about it, I guess?
@joneuhauser Yes! The more your work on reverse-engineering the #AdobeIllustrator files becomes known, the better also for #Inkscape and free formats, tooling and all designers who do not want to be locked in. Also good as a #chaos_computer_club talk.
@niccokunzmann good idea, I’ll look into the CCC
@joneuhauser why not. Especially once inkscape support the ai file format. You can share the whole journey.

@joneuhauser

Is the format Turing complete?

It seems most old formats have so much cruft added they get to that stage even if it's not intended 🫤

@simonzerafa the format was based on PostScript initially. It still looks like that superficially, but a regular PostScript parser would give up quickly.

So the answer to your question is probably yes, but luckily Illustrator doesn‘t use that functionality 😅

@joneuhauser

Ah! I was wondering! 😁

Good luck with your mapping the nether regions of that file format 🙂👍

@joneuhauser tysm for doing this !!

@dflxh sure! I recently added support for HPGL, CGM, Afdesign (with Manpreet) and we haves new contributor which contributed an early version of a Vectornator / Curve import which we‘ll release with 1.4.1.

.ai support might be around for 1.4.2.

As always, do report all issues you find with those compatibility layers :)

@joneuhauser
That is actually quite awesome. Good luck.
@joneuhauser Seems like you haven't experienced the Freehand file format yet :)

@joneuhauser you might be familiar with this legendary comment about psd, or not, sharing it in case.

https://github.com/gco/xee/blob/master/XeePhotoshopLoader.m#L108

xee/XeePhotoshopLoader.m at master · gco/xee

Automatically exported from code.google.com/p/xee. Contribute to gco/xee development by creating an account on GitHub.

GitHub
@tshirtman that is a very accurate description of ai files as well! I sense a pattern.
@joneuhauser that's the impression i got 😅, hope you'll see it through!
@joneuhauser Keep up the good work !
Though I hate to break it to you but inkscape SVG support is very lacking, rendering it unable to understand non inkscape SVGs. I hope this will change in the future.
@mehdi_benadel Do report instances of that to https://inkscape.org/report
Issues · Inkscape / Inbox · GitLab

This inbox is a "friendly feedback zone", we welcome questions, comments, ideas, and bug reports that pertain to the Inkscape software, its related components, and the project in...

GitLab
@joneuhauser @mehdi_benadel also do upload the offending files (or isolated examples if the full file is copyrighted)! Helps a lot with debugging.
@joneuhauser I've spent so much time figuring out file formats. It's frustrating and productive. Keep up the good work!