Extra whitespace around flat symbol in chords when using custom fonts
Reported version
3.0
Type
Functional
Frequency
Few
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
Yes
Project
When I change the font of a chord from the default FreeSerif font to almost any another font (FreeSans being a notable exception), flat symbols in chords are rendered with extra whitespace on either side.
Steps to reproduce:
- Select a note and press Ctrl+K to enter a chord.
- Type in a chord that contains a flat symbol, such as “Bbm” (for B♭m).
- In the Inspector, change the chord's font to something else, such as Times New Roman.
- Observe that the flat symbol now has extra whitespace on either side.
I've briefly played with the various XML files in the styles
folder (such as chords.xml
and chords_std.xml
), but can't figure out how to fix or even work around this problem.
It's worth noting that this problem does not occur with sharp symbols in chords.
Version information: OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.3.0.8529, revision: 2e7a18c
Comments
Not much we can do about that, those fonts are out of MuseScore's control. Those fonts simply have bad kerning infos for these flat symbols
Workaround is of course not to use those but stick with FreeSerif/FreeSans, that's why MuseScore provides them in the first place.
In MuseScore 1 I worked around that issue via those xml files in the styles folder, I believe via this:
In reply to Not much we can do about… by Jojo-Schmitz
I don't think that's true. Times New Roman and Arial don't even contain a glyph for the flat symbol. (I just double-checked both of them using a font editor: neither contains an entry for Unicode code point U+266D.) Consequently they don't contain any kerning pairs involving that glyph.
It appears that the “B♭m” that MuseScore displays when a font doesn't contain a glyph for the flat symbol is created by inserting the “♭” glyph from some fallback font that I can't identify. Because there are never any kerning pairs available when concatenating glyphs from different fonts, this problem can't be caused by bad kerning info.
If we can figure out what this fallback font is, maybe we take a look at its metrics and figure out why the layout is being calculated so badly. In the meantime I'll look at your suggested workaround; thanks.
Well possible, I never went that deep into it. I believe for Windows that fallback font might be "MS Shell Dlg 2"?
Edit: no, that font doesn't have that glyph either. (it is the fallbackfonf for unknown/unavailable fonts though)
BTW: "Arial Unicode MS" gets it right (as does "Malgun Gothic", "MS Reference Sans Serif", "Segoe UI Symbol"), not just FreeSerif and FreeSans, Bravura Text and the other fonts MuseScore provides (except "MScoreBC", "MScoreTabulature")
Also interesting: it seems to work just fine for a double b (“Bbbm”) and double sharp ("Bxm" or "B##m") and also natural ("Bnatural m"). And of course for # too, so only flat is having this issue
I'm not sure what the fallback font is either, and likely it would different from system to system. So the lesson is - don't use fonts for chord symbols that don't actually contain the necessary glyphs (this includes the accidentals but also the symbols for diminished and half-diminished, triangle for major, etc). It's possible to hack around and fix individual problems here and there, but realistically, that bottom line is going to remain good advice.
BTW, kerning isn't directly used in chord symbol rendering, it's all done character by character. Although we can't stop the underlying system doing additional kerning if it detects an opportunity.
In reply to I'm not sure what the… by Marc Sabatella
For Mac - We are using a default called ヒラギノ角ゴシック W3. And (I believe) the default is MS Gothic for Windows. Can we override these defaults, so that we use Bravura Text or Emmentaler Text? I've tested the spacing on the mac font and it's excessively wide. Clearly not built for use in actual notation or to be displayed alongside text. If we could use another default, it would likely look a lot better.
In the image attached, you can see that the flat symbol in Bravura text (using the same unicode) is much narrower. I imagine this is true of the other text alternatives too.
Incidentally, although I prefer Bravura for notation. I'm not as big a fan of how it looks with other fonts. Perhaps Emmenaler Text instead?
Link to "ヒラギノ角ゴシック W3"
https://translate.google.com/translate?hl=en&sl=ja&u=https://www.morisa…
Still happens in: OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.4.2.9788, revision: 148e43f
I'm planning to investigate this further and come up with a fix if possible.
Actually happens ever since
In reply to For Mac - We are using a… by Tantacrul
Any chance of this happening yet? The appearance of the fallback fonts for flats, sharps, etc. have looked poor for years, and it would be really nice to be able to use whatever fonts we want and still have nice-looking musical symbol fallbacks.
Use a font that looks good, like Free Serif or Edwin
And complain to the authors/owners of that bad looking fonts
Or use the workaround I've provided way above
Other than that this issue tracker here has been discontinued, so you might re-report it on GitHub
I just made a list of fonts on my system that had decent kerning for chord symbols:
Andale Mono
Apple Braille
Apple SD Gothic Neo
Arial Unicode MS
Consolas
Courier
Courier New
Edwin
Finale Broadway
Finale Maestro
FreeSans
FreeSerif
Helvetica Neue
MScore
SF Pro
I personally liked Helvetica Neue best; in addition to the kerning, the actual letterform of the flat symbol was clear and quintessential.
Of these the following should be preferred, as they are guaranteed to be available with MuseScore:
Edwin
Finale Broadway
Finale Maestro
FreeSans
FreeSerif
MScore