OpenType substitution classes

I’ve been through the forum and gotten some info on this, and if I were experienced in this area, I’d probably be able to interpret the posts to get my answer. But I’m not, so here we are.

If I’m understanding correctly, Dorico supports OpenType fonts (that include automatic functions like GPOS and GSUB), but not OT features, like superiors and old-style numbers, right? That is, there’s no way to tell Dorico what you want?

So that means that if I want superiors in Dorico, I need to create a substitution class myself (or contextual substitution, or whatever it’s called), within the font, and trigger those class changes through keystrokes?

Yes, the Qt framework doesn’t support the advanced OpenType features, like small caps, alternates, etc.

I don’t know about your ‘workaround’ - I guess you can try!

Thanks. My thought is to use something like square brackets to trigger superiors, and close the brackets to return to normal. Just wanted to confirm Dorico doesn’t do that, so it all has to be functionality embedded in the font itself. @dspreadbury can you confirm that would be possible in Dorico?

I wonder if these features are on the horizon. Hearing it’s a limitation of Qt, rather than Dorico, makes me think probably not.

Ok, it seems that can’t be done either. For superscripts, I’ll need to create a dedicated ligature for every iteration.

Which superiors do you need? If you only need digits (for footnotes, perhaps), Unicode has dedicated codepoints for them: U+2070 (0), 00B9 (1), 00B2 (2), 00B3 (3), 2074-2079 (4-9). No need for advanced font features.

Thanks, I see that. A couple things:

  • They need to match Academico, which I’m using for all other characters
  • I also need flats and sharps, which I’ll have to do by modifying the Bravura glyphs
  • I want these to be inputted without needing Unicode, so I’ll need to assign them as ligatures still.

So I will probably end up creating ligatures for superscripted combinations of b2, b3, b4, etc and #2, #3, etc. up to… I don’t know… b13 and #13? Is that the max that alterations would typically go to?

Well, I’m back to say that Dorico does seem to support OT features: KERN, LIGA, and CALT. Didn’t know about the third one… that’ll be a huge help!

@dspreadbury can you confirm this? Do you know what additional OT features, if any, are planned for future Qt versions?

I believe CALT may be supported only on macOS and not on Windows, or at least that used to be the case (see e.g. here).

The Qt Company haven’t said anything publicly about their future plans for OpenType feature support. My guess is there are essentially no such plans. People have requested such features many times over the years (e.g. most recently here), but nothing has ever come of it.

At present, Qt by default uses OS-specific font rendering technology (i.e. DirectWrite on Windows and Core Text on macOS) but it does also include support for the cross-platform FreeType renderer, which itself has broader support for OpenType features than either of the default OS APIs. However, even when using FreeType, Qt provides no APIs to access advanced typographical features (so we would potentially have to write them ourselves), and more generally, switching to FreeType would potentially change (perhaps subtly, perhaps less so) the appearance of every Dorico project, and that might or might not be a trade-off worth making.

Well, I’m reaching the limit of my understanding on this topic, but Florian’s Figurato uses CALT I think, and it works fine on Windows.

@fkretlow is that accurate? Qt previously did not support CALT but now does?

For the record, I’m not asking for Dorico to add these things (though of course that would be great), just to know what is currently supported so I can work within that. Thanks!

When I began work on Figurato, Dorico supported KERN, LIGA and CALT, as you mentioned. I seem to remember that I experimented with mark-to-mark positioning (MARK, MKMK) but that didn’t work at least on one platform. My memory may be inaccurate here though.

Figurato makes heavy use of the CALT feature so that obviously works on both Mac and Windows.


Great, thanks. By the way, I really admire your font… it’s amazing how much functionality it has with so few glyphs.