These two scripts offer a custom version, with a few additional options, of the basic Illustrator built-in commands “New Artboard” and “Fit to Selected Art”.
I wrote these scripts while designing a font in Illustrator. I had to regularly add to an Illustrator document some new artboards that I had to fit in width to the new glyphs I created, but always keeping the same height, since those artboards were intended for exporting glyphs to as many individual svg files in order to import them in FontForge, and the height of each svg is interpreted by FontForge as the em size of the glyph.
- While the basic command “New Artboard” creates an artboard with the same size as the active artboard at a distance arbitrarily decided by Illustrator, custom-new-artboard lets you type the horizontal and vertical offset of the new artboard from the active artboard (other options: choice of the name and order in the artboards list).
- While the basic command “Fit to Selected Art” fits all four sides of the arboard, custom-fit-to-selected-art lets you uncheck the sides you might not want to resize (other options: include/exclude stroke weight, additional margin).