Copy link to clipboard
Copied
I work a lot with Chinese characters where I need to make lines thicker without making inner holes smaller. Looking at the following photo, I need to transfer from 1 to 2 fast using a simple tool or a script.
What I usually do is I write the text and outline it to get a compound path, release, selecting the lines that I want to offset outwards manually (I don't select the inner holes), Effect>Path>Offset Path with rounded edges, Expand Appearance. Please note that the resulted paths are not united.
Choosing the paths that I want to offset manually takes a long time because I do many of these each day. The example I provided is only for one character, but I usually do names and phrases in Chinese.
The final result does'nt have to be a compound path. If each path was in a different layer it would be okay. I've also found out that working in the outline mode is better for the method I am using. I don't prefer the outline view but I am welling to adapt to it if there is no other solution.
The following photo shows in red where I need the offset to be. It is just an image to clarify what I need to do.
Is there an easy way or a script to offset only that outside path without selecting the paths manually?
Thank you in advance.
1 Correct answer
try this script, select one or more path items after expanding the compound paths.
Groups, text, compoundpaths, etc will be also deselected. Only path items will be selected when the script ends.
// deselectHolesAndNoPaths
// carlos canto 2/5/24;
// https://community.adobe.com/t5/illustrator-discussions/is-there-a-fast-way-or-a-script-to-offset-only-the-outside-path-of-a-compound-path/m-p/14402535#M396285
function main() {
try {var idoc = app.activeDocument;}
catch (e) {alert ('op
...
Explore related tutorials & articles
Copy link to clipboard
Copied
This was my initial idea:
1. Add a fill below Characters (or the object's other appearances if this isn't type)
2. Add the Pathfinder > Merge effect to the fill to 'fill in' compound path counters (top example)
3. Set the fill's opacity to 0
4. Add another fill below. Add Offset Path effect to that
5. Set the type/object/group to Knockout Group in Transparency options:
However, it causes a hairline between the offset fill and the characters that I'm not sure how best to eliminate. Perhaps someone else can come up with a more complete solution.
Copy link to clipboard
Copied
Hi Doug, thank you for your answer. I've applied the steps to the compound path and here is the result.
The color of the text has become white. Inside holes don't appear.
The other thing is that when I Expand Appearance all lines are doubled as shown below.
Copy link to clipboard
Copied
I don't know from those screenshots what kind of object your text is or what appearances it may already have. Are the added fills below the 'Characters' or above? Is it text or not? Please select it before taking your screenshot.
Expanding appearance will create doubled lines because that's what you're doing by adding an offset fill. What outcome do you need?
Copy link to clipboard
Copied
It is a group.
The outcome I am looking for is as the first image I shared in the main post. I will share it here again.
As I've explained the steps I follow to get this result, one of the steps is Effect>Path>Offset Path. Offset Path made from the Effect menu leave only one line when expand appearance is applied.
Copy link to clipboard
Copied
Move the fills below the 'Contents' of the group.
After expanding appearance, use Pathfinder panel > Merge, then delete the red-filled areas.
Copy link to clipboard
Copied
Yes it is way better, thank you so much. As you've said there is hairlines that should be cleaned out. The other thing is paths has been merged where I need them separated for further editing.
Copy link to clipboard
Copied
Quouting the steps I was doing "What I usually do is I write the text and outline it to get a compound path, release, selecting the lines that I want to offset outwards manually (I don't select the inner holes), Effect>Path>Offset Path with rounded edges, Expand Appearance. Please note that the resulted paths are not united."
Maybe there is a way to choose the lines that I want to offset outwards automatically using a script. Since all paths are in separate layers, it would be great if I select all of them and then the script should choose all paths and exclude the ones inside. Typically, in the Layers window, the ones inside usually are above the layer that includes the path they are located on.
Copy link to clipboard
Copied
try this script, select one or more path items after expanding the compound paths.
Groups, text, compoundpaths, etc will be also deselected. Only path items will be selected when the script ends.
// deselectHolesAndNoPaths
// carlos canto 2/5/24;
// https://community.adobe.com/t5/illustrator-discussions/is-there-a-fast-way-or-a-script-to-offset-only-the-outside-path-of-a-compound-path/m-p/14402535#M396285
function main() {
try {var idoc = app.activeDocument;}
catch (e) {alert ('open a document and try again'); return };
if (idoc.selection.length == 0) {
alert('select one or more pathItems and try again');
return;
}
var sel = idoc.selection;
var item;
for (var a = sel.length-1; a>=0; a--) {
item = sel[a];
if (item.typename == "PathItem") {
if (item.polarity == PolarityValues.NEGATIVE) {
item.selected = false;
}
}
else {
item.selected = false;
}
}
}
main ();
Copy link to clipboard
Copied
You may try this bumpy action.
Instruction:
- Download and unzip the file
- In the Actions palette menu, import the action set compound_thickener.aia
- Open the sample file compound_thickener_sample_001.ai
- Select all
- Run the action compound_thickener_001
Copy link to clipboard
Copied
Thank you Kurt, the action worked but it ended up combining the paths after the offset.
Copy link to clipboard
Copied
Yes, that may happen with the action.
You may try the graphic style as per my other sample file above. It won't merge (after expanding appearance).
Copy link to clipboard
Copied
You may also try this graphic style. Download and open the file, select all and apply the graphic style Compound Thickener.
Note that this approach requires to split "nested" compound paths into smaller pieces before applying it.
Copy link to clipboard
Copied
Bonjour,
Exemple (à partir d'une image copie d'écran vectorisée rapidement ce qui explique la mauvaise qualitédu tracé)
Placer l’ensemble dans un calque
Cibler le calque
Aspect > ajouter un nouveau contour (au dessus)
Effet > tracé > Vectoriser le contour
Dans le panneau aspect fair glisser le contour sous le contenu
Les nouveaux objets créés auront le même contour
René
On peut également cibler un groupe.

