You mean you have an multiple master setup and interpolating instances and like to only have the substitution in some of the instances?
The you can use a ‘Replace Feature’ custom parameter in the instances.
I don’t want any interpolation. Perhaps I should explain what I’ve been doing so far. I made a regular font. Then in a separate file, I made a bold version of that font, with it’s own rules and it’s own glyphs, in another file, and exported that as a bold instance of the same font. Like that it can be accessed in use by making the text bold.
Now I got into colour, I see this kind of thing in the right side:
By the look of it I’m assuming I can make a copy of the whole regular font and name the copy ‘bold’ or ‘italic’ etc. and then use that menu to manually edit each glyph to edit the bold versions. I assume this means it would be defined as having multiple masters(?) On that point:
Can I duplicate the entire font and make those duplicates appear on that menu as ‘bold’, just as ‘regular’ appears there? And then edit them there?
Will interpolation happen automatically? If so can I switch it off?
Yes exactly. Got that to work great when the regular and bold were in different files, using calt code similar to the example I gave above, i.e. sub @letters@letters’ by @letters_alt;
Have not tried yet with all in one file but the idea of having them in the same file is very appealing, would make the work a lot easier. If I know how to make that work. From what I gather you are saying then that this would not be done in the calt function if all in one file?
If I have regular and bold in one Glyphs file, can I edit that colour palette for regular and bold separately? Via this menu or some other one? Or do I need to keep the regular and bold versions in separate files to do this?
N.B. if the answer is the latter, this does not affect my previous question as I may then use both methods for separate reasons.
Georg your assistance on this would be deeply appreciated. I still have no idea how to makes rules for just one style, e.g. bold. I can do it if I made the bold as a separate Glyphs file, using calt. But still no idea how to make it when both are in one file. Would really love to know!
No. I do not know how to do that and cannot actually understand your last sentence. But I would love to learn! Would it be possible to tell me what to do in this case, where I want this rule (which I would usually put in the calt function), to only apply to the bold instance?
sub @letters@letters’ by @letters_alt;
In this case, you need an instance parameter. That means you go to File > Font Info > Instances, pick an instance in the left sidebar (e.g. the Bold), and add a new custom parameter by clicking on the plus button next to the Custom Parameters field.
As property, you pick Replace Feature. If you don’t know what that means, see 1.
As value, you type the feature tag (e.g. calt or rlig), then a semicolon (;) as a separator, then the new feature code (sub x by x.alt;). So the complete parameter value could be calt; sub x by x.alt; sub y by y.alt;
If you want to replace more features, you need to add more parameters. One Replace Feature parameter can only replace one feature.
So are we not allowed to use classes in this way of using calt?
If not then I guess I can enter the whole list in brakets for both classes?
Weird, I changed that to listing all glyphs in those classes, space separated, in [square brackets]. But when I try to export I still get exactly the same error message. I had thought the ‘â’ might be referring to ‘@’. But apparently it’s indicating something else is wrong because there are definitely none of them left. How should I be scripting this? It needs to apply to dozens of glyphs. Here’s a simplified example of what my code looks like: calt; sub [a b c] [a b c]’ by [a.ss01 b.ss01 c.ss01];
Ah thanks! Never would have noticed!
Also I’m working through the tutorial you kindly posted on the other thread. Since I could not get the bold only script working I was trying just through calt, since I discovered that even when we have bold and regular in one file, when exported the calt rules actually seem to ‘break’ when you switch from regular to bold. So I can actually make code designed to trigger when switching between styles even without using this method. And found a workaround to not have that make changes to regular.
But, this master-specific code method will come in handy later - so thanks for helping me with that! And it saves me the workaround