Add 4 strings tab clef

• Sep 18, 2016 - 10:56
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Project

4 string tab clef is part of SMuFL but not a first class clef in MuseScore.


Comments

I'm copying my last comments/questions in the other thread here, as they still puzzle me. In the moment I am informally assigned to fix this, or so it seems:

I see SymId::sixStringTabClef and how it is declared, but I don't see how it is connected to a character in a font. And sixStringTabClef is part of "oldNames" in sym.cpp, which makes me wonder if it's current.

I'm looking at the MuseScore font right now and I only see a serif small Tab clef, not a sans-serif version. The big sans serif clef is char code: E06D. The serif clefs are (big, small): E1A2, E1A3. According to the SMuFL spec, E06E is the slot for the 4-string Tab Clef, and this slot is empty in the MuseScore font. See here (and scroll down the page): https://w3c.github.io/smufl/gitbook/tables/clefs.html

It looks like the glyphnames.json and/or metadata.json files in the MuseScore/fonts/mscore folder need to change too. The sans serif clef is "defined" in glyphnames.json. The serif font is in metadata.json. I don't know why they are not in the same file, and I've never worked with JSON. Adding an entry seems easy enough, but I'd like to make sure I'm adding the right entry.

If I had to guess, I'd say that to simply add the serif 4-string clef, E1A3, to the palette, I'd add it to the metadata.json file, slip it into clefs.h, clefs.cpp, and menus.cpp. To make it a clef I can assign to instruments, etc, I'd have to do more work and it would be added to the glyphnames.json file instead.

The 4-string tab clef glyph does not exist in the MuseScore (Emmentaler) and Gootville fonts, but it does exist in Bravura. It would be simple enough to create the glyph in Emmentaler and Gootville, but I don't know what that means to the published "official" versions of these fonts. Emmentaler, or at least the MuseScore version of it has the extra serif tab clefs, as mentioned above, and there is a serif 4-string tab clef, it's just not in the normal character position and is only available from the palette.

For MScore (Emmentaler) you could copy the 4-string serif glyph into the E06E slot for now, as a fallback for that font. Is it Gootville or Gonville? My fonts folder has it as Gootville.

It would also be easy enough to copy/scale the 6-string glyph into the 4-string slot and create a 4-string tab clef for both those fonts.

If that's the case, then messing with the font tables shouldn't be a big deal. That's probably how Mscore got the serif tab clefs, which are not in their proper slot, as there is provision for only one pair of tab clefs in SMuFL. So adding a 4-string tab clef (sans serif) to one or both of those fonts should be free of non-technical obstacles.
Technically, it's easy in FontForge to copy the E06D glyph to E06E, then uniformly scale E06E by 60%. I assume 60% because 6 strings = 5 staff spaces, 4 strings = 3 staff spaces; 3/5 == 60%.