How to make a SMuFL font

Tutorials

In September last year, my family and I went on holiday by mistake to the English seaside. Unsurprisingly, the weather was a little too bracing, and so we swapped staring at the walls of our own home for staring at the walls of a holiday cottage.

While scouring the contents of my laptop for entertainment, I came across the files of Florian Kretlow’s music font, Sebastian, which I had previously downloaded from github. Florian had, by his own admission, abandoned the project some years ago, but kindly made all his trial designs and variations available for anyone to use. “The original designs are a work in progress that I won’t continue. There is in some cases a certain lack of consistency. Modify, develop, change them as you like.”

The files were a collection of FontForge files (FontForge is open-source software for designing characters and creating fonts), containing a panoply of variations and component parts of musical symbols.

Some of the variations of G-clefs from the ‘original’ Sebastian files.

My idea was to make a SMuFL-compliant font, ‘simply’ by transferring a choice selection of Florian’s symbols to the correct Unicode positions, so that they could be used in applications like Dorico. As J.S. Bach might have said: ‘You just put the symbols in the right places, and the font makes itself.” I positioned the webpage for the SMuFL specification (which provided detailed information on what is needed) in one part of my screen, and a FontForge window of my new font in another. I then loaded some of Florian’s files, and started to copy and paste the symbols into place.

It was at this point that I realized the enormity of the task. Bravura, the SMuFL reference font, contains a little over 3,500 symbols. There are over 70 variations on the G clef alone! However, a lot of these symbols are ‘niche’: Dorico itself uses fewer than half of the SMuFL glyphs ‘out of the box’. For instance, some of the glyphs are components for combining into symbols that also exist as glyphs in their combined form. I started with the basics: 3 clefs, 3 noteheads, 3 accidentals, a few rests, time numerals from 0 to 9 and a handful of dynamics, articulations, fermatas, and ornaments. I thought I would get away with a working font using around 200 core symbols, similar to those found in Finale’s Maestro font or Sibelius’s Helsinki.

As ever, things were even a bit more complicated than that. For instance, Finale and Sibelius use component symbols to build flags on note-stems, as a tower of parts. Dorico, however, requires one different glyph for each duration’s flag. (Up and Down.)

Capture the flag

One of the things that I’m particular about in music fonts is flags. I like them just so. Here’s a scan of some traditional engraving which shows my preferred shape.

A scan of some plate engraving from the 1950s.

Sebastian’s flags were already pretty close to this, but I decided to make the gap slightly more evident, and to taper the end of the flag. The upstem flags were also modified for length and position. Because I had to construct up and down flags for every note duration down to 1/1024th notes (or semihemidemisemihemidemisemiquavers as we call them in the UK), all the flags were essentially altered. I felt that this would distinguish the font nicely from Bravura, Maestro and Helsinki (I mean, if you’re going to make a font, there’s no point in making it identical to existing ones.)

Similarly, I then had to construct more rest symbols to accompany these smaller notes, with increasing stacks of ‘rest flags’, and in so doing, ended up altering all of these rests to be consistent. After a short time, I was able to test the font, small as it was, in Dorico, and see what it looked like. It was at this point that I realized that each symbol’s exact size and relative position to the font’s baseline axis was important. Font software uses a measurement unit called UPM (Units per Em), and SMuFL is designed with a staff height of 1000 UPM in mind. So, 1 staff space = 250 units, and symbols take their size from there. Some objects sit on the baseline; some are centered on it; some, like clefs, use the baseline for their defining staff-line (G, C, or F).

At this point, I contacted Florian and told him of my project. He was very happy that someone had shown interest in bringing his work to fruition, and we had a Zoom call to discuss how to collaborate. Generously, he allowed my work on his version 0.1 to become ‘version 1.0’ of Sebastian. Almost every symbol has been thinned, thickened, scaled, rotated, or otherwise ‘tweaked’. A lot of time and effort went into to trialing different versions, in order to get a distinctive and consistent style.

A Sebastian clef, angled by 2˚, highlighted over a scan of traditional engraving.

License to SIL

The original Sebastian symbols are offered on a SIL Font License, which allows anyone to use, modify, and freely distribute them. Derivative works must adhere to the same conditions, and use a different name. If I wanted to sell the font, I could not have used the symbols in Sebastian as my starting point, and I would have had to draw them all from scratch. Eventually, I ended up with about 600 glyphs that were derived in some way from Sebastian designs. This covered all the ‘general music’ symbols that are capable of being ‘styled’ in some way. As said above, Dorico needs around 1,500 glyphs to fill all its panels and dialogs, but many of these symbols are simple geometric shapes: there are a great many squares, circles, crosses, diagonal lines, or combinations of these basic forms. These can’t easily be ‘styled’ into a unique and characteristic design. Luckily, Bravura uses the same SIL licence, so we can ‘borrow’, and even modify, any of the SMuFL glyphs from Bravura, if our finished font is also offered on the same terms.

SMuFL glyph E11A: One of Bravura’s distinctive squares.

 

SMuFL glyph EA53: It hasn’t really found its place in our design

I pity commercial designers, like Abraham Lee of the Music Type Foundry, who must design every single glyph from scratch: even those that are impossible or pointless to draw differently. Even MTF-Cadence, despite having over 1600 glyphs, still has a few gaps in Dorico’s panels (but again, these are in fairly ‘edge case’ symbols).

Good neighbors

Getting an attractive, accurately sized and positioned, distinctive and coherent set of symbols for 1000 glyphs or so is only the start. The relative position of each symbol to other symbols, and to staff lines, is also critical. Parentheses must fit snuggly around the objects they enclose. Symbols must fit well within the staff lines, whether they are sitting on a line or in a space. Who would have considered, without provocation, that the wings of system brackets might collide into clefs?

Bravura, above, hasn’t quite considered this unlikely scenario.

I never meta file I didn’t like

Once you’ve got your consistent, correctly sized and positioned glyphs all being mindful of their surroundings: congratulations. You now have a working font. But there’s still more to do. SMuFL-compatible apps like Dorico need a separate text file which contains additional information that can’t be contained in a font.

This identifies the font as SMuFL-compliant, so it will be listed in Dorico’s Music Fonts selection dialog. It includes engraving settings for things like staff line thickness, which can be set to complement the design of the font. It also includes the anchor points where stems connect to noteheads, and ‘bounding box’ sizes of every glyph. This file, known as a JSON metadata file, has to be assembled by a python script that interrogates FontForge (or other font design app) for the relevant information from each glyph.

This is perhaps the most problematic aspect of the font creation. The SMuFL website contains some scripts designed to work with various font apps. However, there are a few issues. Robert Piechaud (of November2 fame, and so much more) wrote a python script back in 2014 to produce the necessary json file from a FontForge file. However, the script was written for python 2, and FontForge has since moved up to python 3, so the script no longer works.

There are also SMuFL python scripts for FontLab, the commercial font application, though these similarly have been broken by some major revisions to that application. Scripts are also there for the app called Glyphs, though I’ve not tried them. Luckily, Florian Kretlow has come to the rescue again, with his own python script for FontForge. There are detailed instructions, though I will just add that for Mac users, I’ve found a slightly different incantation is needed:

cd /path/to/folder

/Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge ./ff_smufl_metadata.py ./myFont.sfd

Style selection

Dorico’s Edit Font Styles dialog allows the easy selection of a different font for a particular type of notation. With an ever-increasing assortment of SMuFL fonts, you can have Figured Bass, Dynamics, Metronome Marks, Time Signatures, Tuplet numerals, and more, all using different SMuFL fonts, in addition to your choice of ‘base’ default music font.

So if you prefer the dynamics from another font, you can easily choose them. You can also swap in glyphs from any font for individual symbols in the Music Symbols Editor.

Release the fonts

We’ve come a long way from the 174 glyphs in Sonata, the first PostScript music font designed by Cleo Huggins in 1986. The number of SMuFL fonts is increasing: MuseScore’s new Leland font being a recent addition. Now, the opportunity to have a comprehensive music font that not only includes all the symbols as I want them, but which I can adjust, entirely at whim, fulfils one of my wildest dreams. (I won’t tell you the others.) Someone else might have chosen a different set of Florian’s designs, and modified them in different ways. And, of course, they still can. The SMuFL-compliant v1.03 release of Sebastian can be found on github.

A sample engraving PDF is here.

Further reading

Daniel Spreadbury on music fonts: past, present, and future

Further listening

On the Scoring Notes podcast, David MacDonald and Philip Rothman talk with Daniel Spreadbury about the common set of font specifications known as the Standard Music Font Layout, or SMuFL. We get into the history of music fonts and how we got to where we are today with this essential component of music notation software technology. Listen now:

Scoring Notes
Music fonts and open standards with Daniel Spreadbury
/

 

DONATE

Like what you see? Keep Scoring Notes tuned up with a donation of your choice. You can even set up a monthly donation. 100% of your contribution will go towards supporting Scoring Notes. Thank you!

Comments

  1. Abraham Lee

    Wonderful article, Ben! You did great work on Sebastian.

    1. Ben Byram-Wigfield

      Thanks. If you (or anyone else) have downloaded an earlier version, I’d recommend getting the latest, as there were a few bugs (things missing or in the wrong place or not quite right.)
      There’s still some work to do, but I’m using it myself every day. Oh, and I’ve got some prototype python scripts for FontLab in the works.

  2. Florian Kretlow

    Great article. So it’s the weather’s fault after all? ;-)
    I’ve updated the docs for the SMuFL scripts.

Leave a Comment

Your email address will not be published. Required fields are marked *