Update accidental layout code to use new SMuFL "cutout"

• Apr 5, 2014 - 21:29
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Current layout code uses "magic numbers" to tell if two accidentals whose bbox's overlap actually collide or not. SMuFL will now provide four "cutout" metrics we can use instead. Current code isn't broken, but it makes supporting new fonts problematic - no guarantee the magic numbers that work so far will continue to work.


Comments

Bravura now includes new metadata to describe these "cutouts" (bBoxNE, bBoxNW, bBoxSE, bBoxSW). I will update the code to use them, and if looks good, I will add this metadata to the various accidentals for Emmentaler.

I have updated the code to use the new cutOut mechanism for more precise results, rather than the old "magic numbers". Still more tweaking and testing needed, but it looks good so far.

I have added the necessary metadata to Emmentaler. But it turns out Bravura does *not* include the actual metadata even though SMuFL defines how to do so. I'm not sure if Steinberg will be adding the metadata to Bravura, or if we should do it ourselves, or if we should just leave that font alone. Any font without the tags won't be able to take advantage of the ability to partially overlap accidentals (ie, like "kerning").

Here is my branch:

https://github.com/MarcSabatella/MuseScore/compare/25279-bboxNE

Status (old) active patch (ready to commit)

https://github.com/musescore/MuseScore/pull/902

I have implemented necessary support code and add the "cutOut" tags for the basic tonal accidentals (flat, double flat, sharp, double sharp, natural) in Emmentaler. Since hardly any other programs do this sort of overlapping of accidentals in the first place, and the microtonal accidentals are less common and could perhaps benefit from being presented with more space around them anyhow, and because I'm lazy :-)., I didn't add the tags for the microtonal accidentals we support. This could always be added later.

I also tested the code using a pre-release version of Bravura 0.92 - which adds these tags - and it works very nicely with that. So as soon as that is released and merged in, we'll pick that up automatically. Which was kind of the whole point.

Gonville should be updated too.