: Illustrator: script to normalize size of paths I have quite a few irregular paths (approx. 200), each with a different bounding box. I want scale all of these to a similar size. It is possible
I have quite a few irregular paths (approx. 200), each with a different bounding box. I want scale all of these to a similar size. It is possible ?
This:
Change to this automatically:
More posts by @Cooney243
1 Comments
Sorted by latest first Latest Oldest Best
Select objects you want to fit by height and run:
#target illustrator
// ScaleToFitVerticalAxis.jsx
//
// Copyright (c) 2017 Janne Ojala
//
// Licence: opensource.org/licenses/MIT
visitObjects(app.activeDocument.selection, scaleByHeight, 100)
function scaleByHeight(item, targetHeight){
var factor = targetHeight / item.height;
item.height *= factor;
item.width *= factor;
}
function visitObjects(sel, func, opts) {
for(var i = 0; i < sel.length; i++){
func(sel[i], opts);
}
}
Example:
Image 1: Objects on first row are scaled to fit by height on second row.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.