[smufl-discuss] Re: ranges.json

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

[smufl-discuss] Re: ranges.json

dspreadbury
Administrator
Peter wrote:

> That’s nice. I wonder if we could even go one step further then and
> merge ranges.json with glyphnames.json?

I don't think this would necessarily be a good thing. The advantage of
glyphnames.json is that it provides a simple, effectively flat list of the
glyphs encoded in SMuFL. We could potentially add the range as a key/value
pair within each glyph, so the structure would look something like this:

{
    ...
    "4stringTabClef": {
        "codepoint": "U+E06D",
        "description": "4-string tab clef",
        "range": "clefs"
    },
    "6stringTabClef": {
        "codepoint": "U+E06C",
        "description": "6-string tab clef",
        "range": "clefs"
    },
    ...
}

but the disadvantage here is that you would have to assemble the list of
ranges yourself, and there's no elegant way to define the human-readable
names of the ranges, or the code points they encompass, within this
structure.

It's not difficult for us to produce multiple JSON files and it strikes me
that each file might be useful in different circumstances.

Similarly, with classes we could encode the classes for a glyph as an
array within each glyph's entry in the glyphnames.json file, like this:

{
    ...
    "4stringTabClef": {
        "codepoint": "U+E06D",
        "description": "4-string tab clef",
        "range": "clefs",
        "classes": [
            "clefs",
            "combiningStaffPositions"
        ]
    },
    "6stringTabClef": {
        "codepoint": "U+E06C",
        "description": "6-string tab clef",
        "range": "clefs"
        "classes": [
            "clefs",
            "combiningStaffPositions"
        ]
    },
    ...
}

but again you don't then have a classes-first representation, and you have
to enumerate the classes yourself.

So my inclination would be to keep these files separate, but I would be
interested to hear the perspectives of other folks in the community.

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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>