My question was that I need to use the Calt as required not as a contextual and Rainer said it is possible to use the calt in rlig and should work, but as soon as I pasted them in rlig errors popped up and I am not sure what the problem is.
I removed them and left them back in calt and now those won’t export either (error missing ‘=’) not sure where it is needed.
When they were in calt they weren’t working anyways once exported.
Any advice is much appreciated
Hello Najla! It’s hard to tell from this screenshot alone (it doesn’t look like the entire code of the rlig feature). Can you post it again if it’s not like hundreds of lines? Otherwise, maybe attach it as a text file?
Hi @Tosche, this is the contextual alternate code not the rlig, i took this code over to the rlig and it didnt work. The calt doesnt have a start code like the rlig, but either way the error starts when I take it there. Should there be an additional code to it?
PS the code just continues like it s this way but repetitive according to the similar forms.
The issue is somewhere in your code, and you may not know where that is until you show it in full. Would you mind showing it in private?
Your code looks fine. You should be able to paste it into the
rlig feature to have it always active without giving the font user the option to turn the feature off.
In case you still get an error, could you post a screenshot of the error message?
@FlorianPircher Okay so the error that had occured was reolved when I removed my attempt at making classes to make all this simpler.
but here is the error that occurs when I paste it in rlig:
The lines above the screenshot are not compatible with the lines below. Can you show the lines above the error lines? I suspect they do not have a quote mark (
Okay so I think I resolved it, I was pasting it inside the code of the rlig (lookup rlig arab) and when I pasted it outside of that no errors and it is finally working fine.
Sorry for the hassle!
And thank you @Tosche and @FlorianPircher !
Ah yes, putting the code in the exiting lookup would yield an error. The regular rlig substitution is a multiple-to-one case, whereas the calt code with quotes is a different type. They cannot sit in the same block of codes (i.e. lookups), and you need to separate them, which is presumably how you’ve resolved.
@Tosche Yes, I usually avoid doing this but the font needed so many ligatures and solutions that I needed a different solution, with Arabic many people just make more ligatures to resolve it which was getting out of hand for this style.
Thanks for the support!
You can simplify the rules further by grouping the glyphs. The first eight lines could be simplified to one like this:
sub [beh-ar.init teh-ar.init]' [tah-ar.medi zah-ar.medi sad-ar.medi dad-ar.medi] by [beh-ar.init.ss01 teh-ar.init.ss01];
In the groups you’re substituting (the beh and teh groups), the order of the glyph names matter in before and after. If you are using the same group a lot, you can give it a name and recycle it:
@tahs = [tah-ar.medi zah-ar.medi sad-ar.medi dad-ar.medi];
sub [beh-ar.init teh-ar.init]' @tahs by [beh-ar.init.ss01 teh-ar.init.ss01];
The second example does exactly the same thing as the first, but @tahs can be used again later.
@Tosche so even if its more than these two letters? (its beh teh the yeh noon and yeh hamza above) so if this works it just needs the same sequence they are in so it replaces correctly?
Also @tahs would be in the classes? or where? each class is named like that or within the class I write @tahs bla bla
Thank you it will make my life easier to do this
I think it’s worth grouping even if they are only two glyphs, and if grouping result in fewer lines. If the same group (i.e. class) appears multiple times, it’s worth giving it a name.
The @tahs in my example is directly written in the code. Glyphs’s interface has a dedicated section for Classes above Features where you can alternatively put there. If you do that, you can use it in multiple features (in this case, that’s what you may want since you have rlig and calt).