[smufl-discuss] New 'optionalGlyphs' structure in font-specific metadata

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[smufl-discuss] New 'optionalGlyphs' structure in font-specific metadata

dspreadbury
Administrator
Dear community,

This is an advisory about two changes to the font-specific metadata format that will be published in the next revision of the SMuFL specification, which is coming soon.

1. Additional 'alternateFor' key in the 'sets' structure.
The "sets" structure defines a short, predefined list of specific sets of alternate glyphs. At present, the five valid sets are for straight flags, short flags (to avoid augmentation dots), optically-sized variants for small staff sizes, large time signature digits, and oversized noteheads (the latter being the most recent addition). Here is an example of a bit of this structure:

{
    ...
    "sets": {
        "ss05": {
            "description": "Noteheads at larger optical size ",
            "glyphs": [
                {
                    "alternateFor": "noteheadDoubleWhole",
                    "codepoint": "U+F4BA",
                    "name": "noteheadDoubleWholeOversized"
                },
                ...
            ],
            "type": "noteheadsLarge"
        }
    }
    ...
}

The new 'alternateFor' field lists the glyph name of the recommended character for which this specific glyph is an alternate.

Note that the generate_font_metadata.py script does not export the "sets" structure at all. Font designers should adapt the "sets" structure from the bravura_metadata.json file that is distributed along with Bravura, substituting the appropriate code points for the new font in the optional range for the ones from Bravura.

2. New 'optionalGlyphs' structure.
The new "optionalGlyphs" structure is intended to list the name, code point, and (optionally) the class of every glyph in the optional range (U+F400–U+FFFF), so that consuming applications can get an overview of the non-core glyphs included in the font. This is what a bit of this structure looks like:

{
    ...
    "optionalGlyphs": {
        "4stringTabClefSerif": {
            "classes": [
                "clefs"
            ],
            "codepoint": "U+F40D"
        },
        "accdnPushAlt": {
            "classes": [],
            "codepoint": "U+F45B"
        },
        ...
    }
    ...
}

The structure uses the glyph name of each optional glyph as the primary key.

We have uploaded an update to the generate_font_metadata.py FontLab script that will export this structure, provided each glyph has its name entered as a "note" (right-click the glyph and choose Add Note... to edit the note for each glyph). It cannot export the "classes" data, as that is not encoded in the font itself, but hopefully it won't be too much of a hardship to add the class names manually.

If you have any questions about these additions, let me know.

Daniel


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Steinberg Media Technologies GmbH, Frankenstrasse 18b, D-20097 Hamburg, Germany

Phone: +49 (40) 21035-0 | Fax: +49 (40) 21035-300 | www.steinberg.net

President: Andreas Stelling | Managing Director: Hiroshi Sasaki, Hirofumi Osawa

Registration Court: Hamburg HRB 86534

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -