F2 palette broken

• Feb 10, 2014 - 15:43
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Check the F2 palette (pressing F2 after having put any text into edit mode):
F2palette.png
Doesn't really look like musical symbols to me?
25aa51c


Comments

I think those *are* musical symbols, from Bravura - some sort of microtonal accidentals I believe. See also the Symbols section of the Master Palette. But I'd agree that's not the friendliest display in this context, and wonder if maybe the dialog couldn't start off on another page? Page 1, containing the ordinary accidentals, would be my vote. Although it's still pretty overwhelming. I have to say I miss the old dialog that contained only the "greatest hits", and wonder if a third radio button could be added, made the default, that just contained the most common selections.

Oh, another thing, kind of related, so I'm not submitting a separate issue for it yet:

Right now, Bravura is always used for these symbols, even if the font for the rest of the text does have the corresponding symbol. I don't know how reliable one can make a check to say "if current font has the 'same' symbol, use it" (I guess the glyphs are named and not just referenced by number?), but it would be great if that could be done.

Or maybe it is, and MuseJazz doesn't use the proper glyph names? Mostly, I care about flat, sharp, coda, segno, and the quarter note symbol. But if we did have something like the old text symbols dialog that presented a common set of symbols instead of everything under the sun, I could make sure MuseJazz supported them properly.

This is due to the current work by Werner on the text handling. The idea is to be able to use symbols from the score font into any text (styled or not). A start can be seen in dynamics or markers (segno/coda).

Unfortunately, I'm not sure how it will help the use of MuseJazz "special symbol".

I've been playing around with this to see what's involved. I can see that TFragment::draw() is where the font substitution occurs. But figuring out how to check if the character exists in the font for the configured text style is beyond me right now. I was looking at how to avoid setting up a whole ScoreFont data structure, but haven't gotten anywhere yet, so I'm going to leave it for now.

This is something I think we do need to deal with though. Right now, it no longer works to set the Repeat Text font to MuseJazz for codas and segnos, and this is going to be expected, as it always worked in 1.3. And trying to set a given segno to unstyled to work around this turns the segno into the text "&segno;".

I don't think we need worry about random fonts - they can continued to always substitute Bravura, I think. But we should figure out how to handle MuseJazz.

F2 (music symbols) shows all available symbols in bravura in code point order. Most of them are useless in a text context so its hard to find the few usable.
To handle this i added the ability to drag&drop symbols from the palette to a text in edit mode (also double click on a symbol adds it to the text). This allow to create custom palettes with useful symbols for use in text. The list of symbols in the masterpalette duplicates the available symbols in F2. So its an option to remove the F2 musical symbols.

There are also shortcuts for some music symbols. Try Ctrl+f, Ctrl+p etc. This could be extended.

There might be some confusion about the semantic difference between for example an accidental in the accidental palette and the same looking symbol in the symbol palette.

Musical symbols in text are copied from the current musical font (as set in style). If a requested symbol is not available, it is taken from a fallback font (currently bravura).

Ok. I hope I get it and here is what I would propose.

1/ Keep the F2 palette and make a selection of the most likely symbols people might want to use. We do have a pretty good idea since we didn't get a lot of requests in MuseScore 1.3 so the default set in MuseScore 1.3 is good.

2/ We need a way to provide access to special symbols in the text font. This is true for MuseJazz but it's less of a concern if we end up with a jazz font for score since the Jazz symbols front MuseJazz could be use in this score font. But it's a big concern when editing european languages. The F2 palette in 1.3 was really useful because of the presence of the diacritics, the œ, the copyright sign etc...

3/ I still have to use it but I'm not convince by the use of the master palette to add symbols to text...

I agree with lasconic. The need here is to be able to add symbols (where available) from the *text* font, not the score font (or Bravura). If the text font has the symbol, it should be used. And the old F2 palette worked quite well for this - both for the handful of musical symbols as well as for the accented and other characters.

Since this most recent change to the master palette renders the F2 palette irrelevant, maybe just give us back the old F2 palette with the old behavior. We can use that when we want special characters from the current text font and we know our font provides them. We could then use the master palette / symbols when we want something more exotic. Although I too have reservations about the fact that the "symbols" section is special in this respect. Still, I can live that for now.

We also need it to work that if you set the Repeat Text text style to MuseJazz, it is possible to place a coda and segno and get them in MuseJazz. In 1.3, the text style was ignored for these symbols, but you could edit the repeated text and change it to MuseJazz. Annoying, but at least it worked. It would be nice if 2.0 were better, not worse, in this respect.

Interestingly, it already works that your instrument name text styles set to MuseJazz or some other font containing a flat sign (and this is not that unusual), then "Bb trumpet" et al display using the correct font for the flat sign. I think only the items on the Repeats palette are an issue right now.

BTW, there is also a bug inserting symbols in the midst of text seems to placed them at apparently random points within the text - not always at the cursor position. Double click a text, put cursor somewhere other than at end, press Ctrl+f a few times. First one gets placed correctly, next one at the end, next one gets placed one character to the right of the cursor position, next one at the end, and so on.

We will discuss the common symbol list when the panel is ready. In my opinion, we could include the same symbols than the 1.3 palette for a start. The diacritics, œ etc... were quite nice to have. Idem for the right synalepha symbol.

I'm on it. Got the musical symbols happening and added a handful more - double flat/sharp, common clefs, rests, measure repeats. I just need to add the diacritics; still tryin to figure out the best way to actually represent those in the source - as char literals? numeric Unicode escape sequences? some sort of enum that lists them by name?

But fwiw, palette doesn't work while in lyric edit mode, So while I have the synalepha characters on the palette, they don't do much good currently.