Add a component to some characters

Hello everyone.
I have a question and was wondering if someone could give me some highlights on how I can achieve this.
I created a manuscript font that looks like this at the moment:

Now someone asked me if I could create the round letters like “a”, “c”, “d” etc with a little leg on the begining like this image:
Screenshot 2024-05-04 at 18.53.18

I was wondering if there is a easy way to do this with like a component that I could attach to my letters when I need it? Because I want this to be an option that people can activate, rather than be on the default characters. I have lots of contextual alternates already and would like to know if there’s a different way to achieve this with a another method (because I need to add the little leg to all my alternates and accented characters).

Thank you in advance!

You can add a feature (e.g. a stylistic set) that adds some thing before the glyphs. But that doesn’t work well in Indesign (you need to activate the World-Ready Composer).
That you look something like this:

ignore sub @allLetters [a c d o …];
sub a by instroke a;
sub c by instroke c;
sub d by instroke d;
sub o by instroke o;
…

(I didn’t test this, so it might need some tweaking)

If you want to keep the glyph-based approach, try Paste Special (hold down Opt when you open the Edit menu or pressure Cmd-V shortcut) with those glyphs selected.

thanks for the help! that kind of works.
But how can I only add the element when the character is the first one in a word? if that character is between others (like the word “mão”), I don’t want to add that element on the “a” and “o”.

that is what the “ignore” line is for.

ah, I see, I thought it was for that, but it gives me this error "Expected “sub” or “pos” rule type.
How can I fix it?

You need to add the word sub after ignore, like:

ignore sub @AllLetters [a c d o …];
sub a by instroke a;
...

Yes, there needs to be the word sub after ignore. Was missing, but I sneaked it back into the original post.

Now I get this error “Invalid rule: no input sequence specified”

Can you post your code please?

here it is:

Sorry, I forgot that ignore rules only work with contextual patterns. You need to mark the “input sequence” of glyph by writing a ' (single quote) after them, like so:

ignore sub @AllLetters [a c d o …]';
sub a' by instroke a;
...

Looking at the code, I am not sure what is supposed to be ignored by the ignore statement. You want to insert a connector between glyphs, I suppose, so we do not need to ignore, but only go for the right context:

sub @AllLetters @Lowercase' by lowercase-lig @Lowercase;
  • No ignore line.
  • In InDesign, you will need the World-Ready Composer.
  • AllLetters and Lowercase are automated classes, perhaps you want to substitute with custom classes.

thank you so much! this worked perfectly!

Thanks for your reply but I wanted to add a connector on the round letters on the left side, and only when they were in the beginning of a word.
I already managed to do it with Florian’s solution :slight_smile:

ignore sub @AllLetters [a c d o …]';
sub a' by instroke a;
...