Separate apostrophe's for uppercase and lowercase?

Hey everyone, is it possible to set an apostrophe specific to a certain case? I’m working on a font at the moment with particularly tall capitals and ascenders and if I set the apostrophe to the right height for them it’s going to be way too far from the x-height of the lowercase characters. Can you assign an “alternate” apostrophe to lowercase in any way?

You can use the case feature, but if you want more control you could write a custom lookup in the calt feature.

You could do something like this:
lookup apostrophe { sub @Uppercase quoteright' @Uppercase by; } apostrophe;

What is the “case” feature exactly? I’m unfamiliar with that. Would I create a new glyph and title it something like “”?

Here’s Microsoft’s reference on the case feature:

So, yes you would design your apostrophe to work in an all lowercase setting and design an alternate appended with “.case”, which would work in uppercase.

I just tried that and it doesn’t work when testing it, it just uses the same apostrophe as the lowercase version. Could you elaborate on the “calt” method you reference before? I really have no idea what that line of code you typed means (I’m a designer, not a developer, so this is kind of foreign territory for me at the moment).

For the code to work you should have the class “Uppercase” class in your font.
You can generate it automatically by going in the Features tab of the Font Info. Clikc on the + button at the bottom left and click on Uppercase.

You should also have the glyphs “quoteright” and “”. These are the proper glyphs for the apostrophe character.

I also mistyped the second Uppercase I fixed it in the original post.

Under class the only options are “All” or “AllLetters” - even after generating a custom class called “Uppercase” and pasting your code in the text area to the right nothing happens. I made sure I had my glyphs named exactly what you had in that code as well. Weird. Any idea why that isn’t working?

According to the handbook you need have the “cpsp” feature first. But you can trick this.
If you first add the “cpsp” feature from the + menu, it automatically adds the Uppercase class for you. You can then delete the “cpsp” feature.

Tried that too and it still isn’t working - attached a screenshot of what I’m looking here in the font info settings and I think I have everything to your specs but I could be mistaken or missing something?

Also, the ligatures are not working properly either though I feel I’ve designated them correctly after reading through some threads on here?

The “case” feature is triggered when the user specifically marks the text as uppercase in the text-processing application (e.g InDesign). It does NOT automatically turn on if the user merely types capital letters.

In what application are you using the font to test it?

The lookup is not supposed to go into the class definition, but for instance into calt. Are you using the Adobe Fonts folder for testing?

I am asking because this could be a font cache problem. Read this please:

I’ve been trying to test it within the Glyphs app, maybe that’s the problem. If the user has to mark that it’s uppercase that kind of defeats the purpose of it being intuitive - it would be just as easy for them to manually adjust the height as necessary, so maybe I’ll just forget about that feature for the time being. I’m going to test out the ligatures in the Adobe apps and see if those are functioning correctly now though, thanks for the help everyone!

You can test it in Glyphs alright as long as it is a substitution, not a positioning feature, and as long as you activate the feature in the Edit tab. Jeremie’s code works if you put it into calt and set up the Uppercase Class (create it, name it, automate it).

1 Like