Caps only and contextual alternates

Hi. I’ve recently created a Caps only font with two contextual alternates. I have the code for cycling through the alternates, but as caps only. I have also added the default caps to lower case. What would be the simplest way to have the contextual alternates in the lower case?
Thanks

Add them to your code? So, instead of A, you would write [A a], and so on. There are tutorials about OT feature coding.

If you use Glyphs version 2.5, you don’t need to add the lowercase any more. You can double encode the uppercase. That way, you don’t need to deal with components or extra Opentype features.

When I make a new file, the caps now have two unicodes by default. Is this a new behaviour? You “can” double-encode caps or you always have to live with it?

If you “update glyph info” on a uppercase without a corresponding lowercase, you get double encoding. But you can hand edit it in the info box in the lower left. Is there a reason not to double encode?

I imagine there’ll be all sorts of trouble. From what I have seen so far, if you delete lowercase and try to add them back, Glyphs thinks they already exist and refuses my command. Of course I know how to deal with this, but it’s an extra effort and certainly not easy or obvious to less knowledgeable users, just to support minority mono-case scenarios.
Similarly, I am deleting and adding glyphs via scripting in my projects and I am encountering this double encoding as source of error, so now the first thing I have to do is to make sure to delete the second unicode value.

1 Like

The adding of lowercase works much better now. I fixed that yesterday :scream:.

But I mean in the final font. If you ever want to only have uppercase.

Only if you want to make it uppercase only and the intention is made very clear in the file (e.g. only when lowercase is found absent during export time), and it shouldn’t be imposed on every font. Even if the capital double encoding is theoretically okay, I imagine it will frustrate our engineers, as this is a bit too radical and unusual. And the only solution to avoid it shouldn’t be described as “you can” when it’s “you have to” in reality.

I have the update now, it seems to be working fine. Thank you.

Just thought of a scenario: you can make webfonts with partial character coverage for replacing just certain glyphs in a webpage, and then have a certain order of fallback fonts in CSS. We had a case like this in the forum recently. In that case it is thinkable that you only want uppercase encodings for your uppercase because you do not want to override the lowercase of the fallback font.