Page 1 of 1

Creating a SMuFL font

Posted: 13 Sep 2020, 14:23
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.

Re: Creating a SMuFL font

Posted: 14 Sep 2020, 02:49
by odod
waiting here to learn ...

Re: Creating a SMuFL font

Posted: 14 Sep 2020, 07:07
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.

Re: Creating a SMuFL font

Posted: 14 Sep 2020, 07:37
by OCTO
odod wrote:
14 Sep 2020, 02:49
waiting here to learn ...
Me too! Following...

Re: Creating a SMuFL font

Posted: 14 Sep 2020, 08:41
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>

Re: Creating a SMuFL font

Posted: 15 Sep 2020, 11:59
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.

Re: Creating a SMuFL font

Posted: 15 Sep 2020, 12:15
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!

Re: Creating a SMuFL font

Posted: 16 Sep 2020, 07:04
by OCTO
Beautiful! Is that Sebastian?

Good to hear about Github. I will try to make some tests in it.