Multiscript font file and export for single scripts - feature code management

I have a font file with script latin and script hebrew. Now I want to export one .otf for latin and hebrew together and one .otf for latin only.

But I have a lot of feature code and classes in this font file and managing the export with the custom parameters is very painful. (expecially as the font file will be in development for a longer time range…)
I think, it would be much easier, if feature code within script tags could be omitted on export. Or a mechanism like the conditional feature code for variables. Or if I could write special “versions” of feature tags for the scripts. (ss01#latin, ss01#hebrew e.g.)
Also classes, that are not needed for the not exported scripts, should be simply ignored.

Are there any possibilities yes, that I couldn’t find? Or would this be a feature request?

1 Like

Ralf has a good point; adding a feature similar to “conditional statements” to other OpenType features could be really beneficial. Instead of using scripts, which can be limiting, we could implement a tagging system. This way, we could tag certain parts of the code and then specify, through a Custom Parameter in the font’s settings, which tags to ignore during export.

Right now, exporting fonts that are subset to specific scripts is quite complicated. It requires manually removing classes and updating features, which is done by using a “Replace Features” CP.

Here’s how it works currently with an example of a stylistic set:

sub a by a.ss01
sub alpha by alpha.ss01
sub a-cy by a-cy.ss01

Exporting a font where Latin and Greek glyphs are removed using this setup would result in an error.

However, if we used conditional code, it would look something like this:

#if LAT_tag
sub a by a.ss01
#end LAT_tag

#if CYR_tag
sub a-cy by a-cy.ss01
#end CYR_tag

#if GRK_tag
sub alpha by alpha.ss01
#end GRK_tag

This way, when exporting a font with only Cyrillic, I could apply a Custom Parameter called “OpenType Ignore Tags” and specify GRK_tag and LAT_tag to be ignored.

Good point. I’ll have a look.

The ss01 feature is not a good example as you can just leave it on automatic and it will be regenerated on export. Same for the default classes.

1 Like

I would be infinitely grateful @GeorgSeifert
This would greatly simplify multiscript file management.