fkretlow / figurato

Figured bass font for music notation software.
SIL Open Font License 1.1
18 stars 5 forks source link

RNA support #3

Closed MarcSabatella closed 5 years ago

MarcSabatella commented 5 years ago

Thanks for creating this font!

I am one of the developers of MuseScore. As you know, we have built-in support for figured bass, but I am interested in Figurato for another reason: Roman numeral analysis. I'm guessing I'm not the only person to ask about this, so if you have a stock answer, I will happily accept a pointer to it.

But FWIW, I looked at your font, copied i, v, I, V, degree, and degree-slash characters to it from FreeSerif, and it's a workable RNA font, except for the positioning. I'm not super adept with font design but do have some idea about creating kern pairs etc. I would be happy to contribute my own efforts in this, if you think it would be useful. I suspect you could knock it out much faster if you were so inclined, but I'm also happy to assist in any way I can.

MarcSabatella commented 5 years ago

I guess we'd also need to do something different with the "i" ligatures. I just deleted them in my local version. I also played with positioning some, which required rescaling and other changes, which makes me think it's probably better just to have two different fonts, as it might not be possible to serve both needs with a single font.

Here's a sample:

image

fkretlow commented 5 years ago

Hi Marc,

No stock answer! As it happens I’ve already considered creating a font for harmonic analysis, so yes, I’m interested.

Can you point me to a few resources that describe what we’d need? I don’t think it’s impossible to serve both needs with a single font, provided there’s enough time and perseverance. Formulating rules of this complexity in Adobes feature language is quite a task. The language is simply not built for this.

Thanks for getting in touch!

MarcSabatella commented 5 years ago

Thanks for your response! I don't know of any single resource with a definitive / exhaustive description of the language. Obviously, it shares the basic similarity with figured bass of using stacked numerals, but there's probably not much commonality after that.

The most obvious difference is the need for the actual Roman numerals - perhaps prefaced with flat or sharp, as in my bVI7 above. After that it gets increasingly subjective, the needs of classical and jazz musicians start to diverge more.

Classical musicians would want the N for Neapolitan, Fr/It/Ger for augmented sixth chords. Basically, if there were a full set of letters that displayed "normally" when used before numbers, that would cover a lot of use cases. In my version, I actually shifted the letters down and scaled them larger, otherwise the numbers didn't look like superscripts, and it was easier to move the letters than to figure out how to move everything else without breaking anything. I got lucky and it happened to also look good with the diminished and half-diminished symbols (which I mapped to o and O for now, but would of course want to change, probably 0 and a ligature 0/):

image

Jazz musicians are more likely to want additional options after the numbers, to emulate what they do with chord symbols. In particular, people would want to be able to place things like #5 and other alterations as they do with chord symbols, but they shouldn't go under an initial - they should go next to it (they could stack after that if it happened to be convenient). I see I can get that by embedded spaces after the initial number and before anything else, but I'd want a single space to do the right thing no matter what that first number happened to be, the next thing I typed would appear immediately to the right. Easier said than done, I'm sure!

So to a first approximation, anyhow, adding the rest of the alphabet properly sized and positioned relative to the numbers) and the diminished and half-diminished symbols, then maybe adding ligatures for b5, #5, b9, #9, #11, and b13 and somehow getting these to appear after rather than under a prior 7, would be the the main things needed.

fkretlow commented 5 years ago

Thanks for the description!

After thinking this through briefly, I daresay that it is probably possible to create a font that does all this conveniently.

I'm not sure whether I'd add this to Figurato or create a new font that contains parts of the current functionality. Do you think we'd need the full figured bass functionality (altered numbers, sophisticated accidental positioning, parentheses etc.)?

Another question comes to my mind though: Wouldn't it make more sense to add an analysis feature to Musescore? I'm not familiar with its architecture, but there's certainly a much more adequate framework that we could use. It took me half a year of work to put Figurato together with what limited tools the current OpenType technology offers... Also, I'm pretty sure that Dorico will have an analysis feature at some point, so spending much time on another font that will eventually become obsolete for most professional users doesn't seem to make much sense.

Of course the whole thing would look differently again if the font would likely be used in other environments too, word processors, InDesign, LaTex...

MarcSabatella commented 5 years ago

Separate font makes sense to me. In addition to simplifying the design, it eliminates the break in compatibility that would come from changes in the meaning of, for example, "i6". I don't think we'd need the complete figured bass functionality, although parentheses could certainly be nice. For accidentals, I think just those handful of ligatures I mentioned would do the trick. Most likely we'd continue to think of new things, though, so my inclination would be to start with a clone of Figurato and hope for the best. But it makes collaboration much easier if people contributing to the RNA aspects of the font don't have to worry about breaking something only used in figured bass.

So speaking of collaboration: as I mentioned, I do have some limited skills here and am willing to learn as I go. I would love to come to agreement on a basic approach, then I would volunteer to get a basic version of this going myself and make a "beta" version of it available sooner rather than later. Based on what I've already knocked out, I think I could have something usable enough to share in some limited way (and I'd be able to get volunteers easily) very soon.

Depending on the feedback we get, we could figure out what else needs to happen and share further development as well as accept contributions from the community (which is probably larger than that for figured bass).

BTW, something else occurs to me: we need "/" to reset the position much as I suggested Space should, so one can write V65/ii and get something reasonable.

Another aspect I didn't consider at first are the symbols used for modulations. Here's a typical image I found online:

image

Probably one would expect to just create these brackets as separate elements out of | and _ characters that connected nicely, and then people would expect to position these manually.

Finally, as for why not do this natively in MuseScore - I have long a sense that the requirements of RNA are enough simpler than figured bass that it would actually be simpler to do it with a font, and then that font could be made open source and used in other applications including word processors. And perhaps get the character set defined as part of SMuFL (I have corresponded with Daniel Spreadbury about this and he is open to it.

fkretlow commented 5 years ago

That sounds great.

Would you like to go on with what you're doing and show me once you've some sort of a prototype working?

Otherwise I would recommend that we start by collecting a concrete list of what's definitely needed and agree on the strings that a user would input to get those combinations. Once we've got that basic system shaped out collaboration will be much easier.

One thing that comes to my mind: from a designer's point of view the numerals in Figurato are not compatible to a Times-like textface. I would prefer taking the letters from a font from the Century family. Maybe Academico?

MarcSabatella commented 5 years ago

Yes, I will put together a working prototype and send it to you.

When I mention coming to agreement on a "basic approach", let me be more specific about what I am proposing, based on what I tried and seems to work:

Beyond that, getting the letters and numerals to work together well requires something to give. My initial attempt at downsizing the existing numerals and moving their origins up messed up the positioning you had for aligning vertical columns. Probably there was a way to get that to work, but I gave up did the opposite - increasing size of the letters and lowering them. Then I increased the overall descender height and downscaled everything back to an em height of 1000 to compensate This was a hack; it results in letters that are about normal size but too low compared to other fonts on the same baseline. I'd much rather make it work by downscaling and upshifting the numerals. So I'll give that another shot.

MarcSabatella commented 5 years ago

You know, as I work on removing the things that are not necessary, I'm starting to think it might actually make more sense to start fresh and just copy over the numerals & associated tables. Or, just create ligatures for 64 and a couple of other common combinations and call it good - that's actually better form the perspective of then positioning a following "/". I don't know, I've got three different versions of this going now, we'll see which gets to a usable state first...

MarcSabatella commented 5 years ago

Turns out to be simple enough to do everything I originally thought of just using ligatures and some other relatively simple substitutions - easier for me than figuring out how to reset the positioning after the stacked figures in Figurato. An interesting exercise either way! I have versions based on FreeSerif as well as Century Schoolbook L (Academico isn't open source apparently). The sizing is actually working out better for me using letters from FreeSerif and then downscaled numbers from the bold version, but now that I have a better idea of what I'm doing, I can pretty much swap in glyphs from any font then just adjust a few things here and there.

I am still sorting out licensing and naming issues, then I'll post what I have.

image

fkretlow commented 5 years ago

That's great!

Yes, I guess this'll be a lot easier than I thought if we don't need Figurato's flexibility with the stacked numbers.I look forward to seeing what you've got!

MarcSabatella commented 5 years ago

Well, someone somewhere will someday want arbitrary combinations of numbers, and no doubt other things I haven't implemented. So I wouldn't be surprised if GPOS tables and some of the other fancier features of Figurato don't start to seem necessary. But for now, I'm satisfied this approach can meet some needs already.

I've created a github repo that includes the version I mentioned - FreeSerif glyphs plus ligatures and contextual substitutions.

https://github.com/MarcSabatella/Campania

I am calling it Campania (region in Italy where my family is from). If we decide it does make more sense to merge these ideas into something descended directly from Figurato, we can obviously revisit the repo location, name, licensing, etc.

fkretlow commented 5 years ago

That looks great, Marc!

I'm currently traveling – I'll take a closer look at the weekend. Shall we continue this conversation in the Campania repository?

MarcSabatella commented 5 years ago

Makes sense to continue there as this version is a completely separate font.

Safe travels!