Italic and Script font options

I just bought a new font to use as my primary face in Emacs. It's a cool one called MonoLisa, I think it looks great.

It has a nice looking script variant that lets you turn your italics into a cursive looking font. Unfortunately it's a fancy OpenType feature that most things, including Emacs don't support properly yet.

In their FAQ they mention that you can use a tool called OpenType Feature Freezer to modify the font so that the optional glyphs become the default. They get used all the time without requiring the editor to properly support the OpenType feature.

This is a good opportunity to explore OpenType features.

To get the list of possible font features you can pass the Font Freezer the -r flag, it will list out the features supported by the font.

pyftfeatfreeze -r MonoLisa-RegularItalic.otf
# Scripts and languages:
-s 'DFLT'
-s 'cyrl'
-s 'cyrl' -l 'BGR '
-s 'cyrl' -l 'SRB '
-s 'latn'
-s 'latn' -l 'AZE '
-s 'latn' -l 'CRT '
-s 'latn' -l 'KAZ '
-s 'latn' -l 'MOL '
-s 'latn' -l 'ROM '
-s 'latn' -l 'TAT '
-s 'latn' -l 'TRK '
# Features:
-f aalt,calt,case,ccmp,dnom,frac,liga,locl,numr,onum,ordn,salt,sinf,ss01,ss02,ss05,ss06,subs,sups,zero

While it's possible to find a list of what the OpenType features do on Wikipedia, in many cases we're still left not knowing what the Stylistic Sets are.

Once we have a list of features supported by the font, it's possible to test these features out on the MonoLisa website by modifying CSS variables.

If we load the specimin or playground page and find the CSS rule that sets the font for the page, we can add font-feature-settings: rules to test out the different options.

For example, if we add font-feature-settings: "ss02";, this will enable the ss02 feature on all text on the website. We can then go through each of the features listed out by the Feature Freezer and try them all out.

From there we can figure out which features we want to enable and pass them to as arguments to the Feature Freezer and produce a font we with those features enabled by default.

If we wanted to produce a font with the ss01 and ss02 features enabled by default, we could then run this command.

pyftfeatfreeze -n -v -f ‘ss01,ss02’ source-font.otf output-font.otf