This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@author: Aaron Ogle | |
Script to Export Illustrator files as PNG's then make a thumbnail. | |
Runs in CS5 only due to a missing function. Haven't found a work around yet. | |
*/ | |
// Disable Alerts. We want this to be as unobtrusive as possible. | |
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Replace fonts in all the Illustrator files in a folder | |
Edit the array at the top to your own substitutions | |
Find the font names to replace using: https://gist.github.com/2778294 | |
*/ | |
// fonts to replace | |
var substitutions = [ | |
['BellGothic BT', 'Bold', 'Roboto', 'Condensed'], | |
['BellGothic Blk BT', 'Black', 'Roboto', 'Bold Condensed'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
List the fonts | |
This shows you all the fonts used in all the Illustrator files in a folder, | |
even if the fonts aren't installed on your system. | |
You can then replace them with this script: https://gist.github.com/2778305 | |
*/ | |
function getAllFiles(folder) { | |
var fileList = []; | |
function recurse (folder) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* fullscreenify() | |
* Stretch canvas to size of window. | |
* | |
* Zachary Johnson | |
* http://www.zachstronaut.com/ | |
* | |
* See also: https://gist.github.com/1178522 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT http://rem.mit-license.org | |
function trim(c) { | |
var ctx = c.getContext('2d'), | |
copy = document.createElement('canvas').getContext('2d'), | |
pixels = ctx.getImageData(0, 0, c.width, c.height), | |
l = pixels.data.length, | |
i, | |
bound = { | |
top: null, |