Referring to this thread about excluding some nodes from rounding filters, currently there is no way to add custom info to nodes for batch filter/cap/corner component processing, so I like to ask if you can implement something like this so any filters/cap/corner components can selectively be applied to those nodes (or not).
I am not sure if this is reasonable as manual work will still have to be done tagging nodes on thousands of characters, but otherwise this feature request should at least make things more creative and accurate with a little less time.
For example, I want to exclude these red circled nodes from filter processing. Then I want to batch add a cap component to the blue circled nodes.
Otherwise is there a better way to do this?
There is a way to exclude nodes from the “Round Corner” filter. Only there is no UI for it (yet).
Select a node and run this in the macro window:
Layer.selection[0].name = "c"
Each filter would need its one way as they all have different requirements.
So I tested the macro, and when I put a CJK glyph through round corners filter, it ignores the “c” node, which is what I am looking for.
So this is my test result.
But I don’t like to select nodes one by one and apply the macro each time. I want to select multiple nodes and apply it all at once (and to another compatible master if possible).
Also, what about custom labelling a node other than “c”? Let’s say if I draw a cap or corner component, I hope it will be possible (via scripting) to automate inserting such components into the nodes when labelled correspondingly.
Regardless, I hope that a GUI for labelling nodes can be done in the near future.
And please explain “Each filter would need its one way as they all have different requirements.” Does that mean that different filters need different labelling for them to function differently?
Feel free to adjust the script. That is the most useful thing about scripts that they are very easy to adjust and extend.
Each filter works slightly different and you like to control each one individually. So each filter needs to have its own way of doing things (e.g. its one label/tag).
that is already possible. You can write a script that does exactly this. But why not add the corner/cap directly, instead of adding the label.
But why not add the corner/cap directly, instead of adding the label.
Yes, I can do that directly but I feel it can only be done manually for each node, one-by-one. My idea is that I’d like to batch insert multiple corner/cap components into multiple shapes with the nodes marked with the correct corresponding label, hence the blue circles in the picture in my first post.
Maybe my requested workflow may not make total sense as there wouldn’t be time saved when I am dealing with thousands of characters (and I do not have a smart component system as the font I am working on does not have any). It’s just shapes only made to be master compatible. Hence why I want to identify some nodes for controlled results, then batch insert the components rather than doing it one by one.
On the other hand, I was able to modify the script you gave me to make it recognise multiple nodes across masters. Still, I am new to this scripting thing.
You can select several nodes and add corners …
Thanks for the tip. I can do that for corners, but not for cap components.
Thanks for your help, and your willingness to look into considering cap components for multi-selecting nodes.
Although after playing around with components, I feel that I need to either learn more scripting or find a good plugin in order to batch add components the way I want them to look like. I find that some of the components are added in the wrong direction despite the node starting point being the same, the vertical strokes being the same shape, and I need to figure out what’s going on. I may make a new topic about this.
Here’s an example of my experiment, along with my corner component. The ones circled are components added in the wrong direction, and that’s after I selected all the nodes I want to add the corner component to directly.
I don’t know what else I can do as someone relatively inexperienced with the matter, but I am willing to learn more.