cfpb / design-manual

⚠️ THIS REPO IS DEPRECATED ⚠️ A set of design principles and standards for the Consumer Financial Protection Bureau.
https://cfpb.github.io/design-manual/
Creative Commons Zero v1.0 Universal
98 stars 71 forks source link

FEWD - Run the draft subset of icons through the Ai Script #559

Closed jimmynotjim closed 6 years ago

jimmynotjim commented 6 years ago

From chat with @Scotchester before he left:

Existing Illustrator script:

#target illustrator
#targetengine main

var doc = app.activeDocument;
var artboard = doc.artboards[0];
var desiredH = new UnitValue("16", "px");

desiredH.convert("pt");

artboard.artboardRect = [
  artboard.artboardRect[0],
  artboard.artboardRect[1],
  artboard.artboardRect[2],
  artboard.artboardRect[1] - desiredH.value
];

Idea for new script to maintain their vertical positioning (for non-round icons): Select all art Set left x position to 0 Get right x position Set artboard width to match

jimmynotjim commented 6 years ago

Turned out it was faster to make adjustments to the svg files themselves and get feedback from those tweaks than to try and figure out the tool first. We'll wait to adjust the script till we've got the sizing nailed down.