Creating a SMuFL font

Music notation symbols, fonts, font sources and font creation, SmuFL.
benwiggy
Posts: 834
Joined: 11 Apr 2016, 19:42

Creating a SMuFL font

Post by benwiggy »

As my idea of fun, whilst locked-down with no internet, I decided to take Florian's unfinished "Sebastian" font, and convert it to be SMuFL-compliant.
After a couple of weeks, I now have a functional, but limited font in Dorico, using the Sebastian glyphs. It's been a useful learning experience.

With over 3,500 characters in Bravura, the scale of the task can seem daunting. But a lot are very 'niche'. Also, remember that Bravura is offered on a SIL font licence, so you can copy or modify any glyphs from there. (Your font must then also be released on a SIL licence.) Quite a lot of glyphs are entirely 'geometric' shapes, and there's only so many way that you can draw circles, squares, triangles and lines, etc.

Secondly, within Dorico, various notation elements have their own Font Style, such as Dynamics, Figured Bass, Time Sigs, Chord Symbols, Metronome markings, etc; and you can also assign any glyph from any font to any given symbol.

It's therefore a much simpler task to let Bravura 'fill in the gaps', either in the font or in the program. Conversely, you can produce a SMuFL-compliant font that only has your preferred symbols for dynamics, or figured bass, or even individual noteheads, which you can patch in to a given project, no matter what the music font is set to.

The SMuFL specification is very well documented here: https://w3c.github.io/smufl/gitbook/
The bits about metrics and metadata are the most useful. Then the glyph tables show you want you need to put where.

-----------

Anyway, I've been discussing with Florian about how to collaborate on 'completing' the font (well, as much as we feel is sufficient - Dorico itself doesn't use lots of the glyphs in the standard; November2 has under 2,000 glyphs; MTF-Cadence has over 1,600. I've done 460!)

So if anyone who has experience with making music fonts would like to get involved, do send me a PM. You'll need fontforge, as I think that's the only app for which there's a script to generate the json files.
User avatar
odod
Posts: 187
Joined: 25 Nov 2015, 15:10

Re: Creating a SMuFL font

Post by odod »

waiting here to learn ...
Nuendo 12, FL Studio 20, Reaper 6, Dorico, Sibelius, HOOPUS, Pianoteq 6, Ivory II, Slate, Plugin Alliance, Soundtoys, and yeah i am a gear slut

Serenade Music Engraving Service
benwiggy
Posts: 834
Joined: 11 Apr 2016, 19:42

Re: Creating a SMuFL font

Post by benwiggy »

odod wrote: 14 Sep 2020, 02:49 waiting here to learn ...
Well, most of it is just putting the glyphs in the right places, at the right scale, and in the right position relative to the baseline. (And, as Bach said, the font just makes itself! :lol:)

You have to create anchors for noteheads to show the stem attachment positions (though you can also do that in Dorico). There are other anchors used for things like cut-out rectangles, optical center, etc -- all in the SMuFL spec.

The tricky bit is running a python script to create a .json file from the FontForge .sfd file.
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Creating a SMuFL font

Post by OCTO »

odod wrote: 14 Sep 2020, 02:49 waiting here to learn ...
Me too! Following...
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
benwiggy
Posts: 834
Joined: 11 Apr 2016, 19:42

Re: Creating a SMuFL font

Post by benwiggy »

Scripts for FontLab and Glyphs are found here: https://github.com/w3c/smufl/tree/gh-pages/scripts

The script for fontforge only works on versions released in 2019 and earlier -- they used python2, and now FF uses python3. Florian wrote a new script, which is here. https://github.com/fkretlow/fontforge-smufl-metadata

There are full instructions: you need a copy of the glyphnames files in the same directory. However, I found it would only work (on a Mac) if I called the script like this:

Code: Select all

/Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge  ff_smufl_metadata.py <FF filename.sfd>
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Creating a SMuFL font

Post by OCTO »

benwiggy wrote: 14 Sep 2020, 07:07 (And, as Bach said,
:)
It sounds like my composition class, when I tried to give the most simple explanation how to compose: "it is very easy: a tone can be either ON or OFF."
benwiggy wrote: 14 Sep 2020, 08:41 Scripts for FontLab and Glyphs are found here: https://github.com/w3c/smufl/tree/gh-pages/scripts

The script for fontforge only works on versions released in 2019 and earlier -- they used python2, and now FF uses python3. Florian wrote a new script, which is here. https://github.com/fkretlow/fontforge-smufl-metadata
Can we create fonts collaboratively via Github? Just curious.
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
benwiggy
Posts: 834
Joined: 11 Apr 2016, 19:42

Re: Creating a SMuFL font

Post by benwiggy »

OCTO wrote: 15 Sep 2020, 11:59 Can we create fonts collaboratively via Github? Just curious.
Yes! The "UFO3" font format saves each glyph to a separate file, and Florian has written a fontforge script to build the .otf font and .json file directly from the UFO3 files.

So we can work on different glyphs and upload our files. (Github doesn't upload files if they are identical to existing ones.)

So far, it's got the best-aligned breves of any font!
Attachments
Screenshot.png
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Creating a SMuFL font

Post by OCTO »

Beautiful! Is that Sebastian?

Good to hear about Github. I will try to make some tests in it.
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
DatOrganistTho
Posts: 192
Joined: 19 Jan 2016, 17:30

Re: Creating a SMuFL font

Post by DatOrganistTho »

benwiggy wrote: 15 Sep 2020, 12:15
OCTO wrote: 15 Sep 2020, 11:59 Can we create fonts collaboratively via Github? Just curious.
Yes! The "UFO3" font format saves each glyph to a separate file, and Florian has written a fontforge script to build the .otf font and .json file directly from the UFO3 files.

So we can work on different glyphs and upload our files. (Github doesn't upload files if they are identical to existing ones.)

So far, it's got the best-aligned breves of any font!
That looks great. Is there any chance you'll be sharing this publicly? Or, would a monetary gift to you suffice to merge Sebastian's empty glyphs with Bravura?
LilyPond Lover
Composer and Transcriber
Teacher and Performer
benwiggy
Posts: 834
Joined: 11 Apr 2016, 19:42

Re: Creating a SMuFL font

Post by benwiggy »

I presume the finished result will be free and open-source -- if we use any glyphs from Bravura, it would have to be! We're using github to collaborate, so the files are public, though unfinished.

I dare say we could just copy over every glyph from Bravura that we didn't plan on creating. But TBH, the number of glyphs that Dorico actually uses by default is certainly less than 750. (Finale and Sibelius got along with only a few hundred.)

Hopefully, the lessons learned from how to create a SMuFL font will make creating new ones more easy.
Post Reply