Changing anchors

Hey guys, I have multiple anchors inside of my glyphs. When placing a component, it doesn’t align to the correct anchor.

I’m looking for a script that will help me to choose the correct anchor for my components.

I marked the components’ glyphs with tags to help identify them.

Is there a script that can decide that all the components that have a specific tag, In selected glyphs, will change the anchor to anchor X instead what they are attached to?

In other words, I’m trying to find a way to select different anchors automatically, and not using the Anchor icon and doing it one by one.


** btw, there is a bug that sometimes you can’t see the Anchor icon at the bottom, but if you click where it is supposed to be, you can still open the small anchor menu.

What anchors do you have in the base glyph and in the marks?

The base glyph has a few anchors like “Topleft” “Bottomright” “Con1” “Con2” “Con3” and a few others. I placed the base glyph as a component in a new glyph. Then I placed two other components that have “_Topleft” “_Bottomright”, “_Con1” “_Con2” “_Con3”. But sometimes, it confused them. So I need to click on the Anchor icon in the bottom and select the correct anchor.

I thought to Tag one of the components that has the “_Con1” "_Con2 anchors to help identify them with a script. And say that if this component has this X Tag = Use X anchor.

I hope it makes sense.

Thanks a lot!

Mark glyphs are not supposed to have more than one anchor that starts with and underscore. What are you trying to do?

1 Like

What are Mark glyphs? Components?
I’m composing a glyph with a few comps. One comp sticks to an anchor of another comp. And I need to change it. I can do it manually with the Anchor icon, But I have a lot of glyphs. So I thought to Tag the glyphs to identify them. And then tell to all the comps with the same Tag to use another anchor.

The mark glyphs are the ones that have the underscore (e.g. “_top”) anchors (usually they are diacritics or vowels).

1 Like

Ok, thanks a lot for clarifying that. So why are they not supposed to have more than one anchor? In my case, I have a few. I need to have a few. Is there a way to control what anchor they will stick to? As I said, I’m using the Anchor icon at the bottom, and it is doing the job, But since I have a lot of glyphs, I need to go and do it one by one… Any solution to my need? Thanks.

The usual use case is that way. Can you show a screenshot of what you are typing to do?

1 Like

Sure. I’ll send it directly to you since my work is confidential. Thank you @GeorgSeifert