UI font is changing without notice

• Dec 6, 2018 - 08:54
Reported version
3.0
Priority
P0 - Critical
Type
Graphical (UI)
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

ecfaa4bdad, macos 10.13.4

  • Launch MuseScore with -F to get a clean state
  • Look at the font if the UI. It's the system font and it looks good
  • Go to preferences and change anything (I changed the path for the soundfont), press OK
  • The UI font is changed and MuseScore looks all funky.

    Capture d'écran 2018-12-06 09.53.17.png

Probably related to : https://github.com/musescore/MuseScore/commit/bf5e1aee70b8d891167d2d606…
and to #277588: UI font size

I say it again, having more options in any piece of software is not a feature, it's often a bug. Please read https://en.wikipedia.org/wiki/Feature_creep

I don't think it's a good idea to have font family as a theme option, even font size is debatable. It should be an OS level option.


Comments

First, I cannot reproduce the bug, I guess it could be macOS-specific?

I agree it would be best if the OS set the default and then we provided an override, and if I knew how to make that happen I'd be happy to. But unfortunately, the world of high DPI displays is still very much not standardized, and the various options provided by the different OS's don't always work as people expect, or they don't know how to use them, or different applications treat them differently. So sometimes it is a matter of upping the actual font size in the OS to get things readable on high DPI displays, sometimes it works better to leave the font size alone but change a "scaling" option, etc. Then there are environment varilables you can try to set to override behavior for Qt applications, etc. And then different applications interpret all of these differently, so you can end up with applications looking different on the same system. The end result is it's really easy to get into a situation here you've found OS settings that work well enough for the other programs you use but the text is too small for MuseScore.

So really, it is pretty important to have controls over scaling of things in order to provide a good experience in this world of confusing and conflicting options around high DPI displays. I'm fine with them being moved to the Advanced tab, but losing them would be a step backwdards, I think.

Of course, the bug needs fixing, but again, I can't reproduce.

Whether it is good or not is a separate question I'd rather not get into :) What I am curious about is the font changing bug. I can't reproduce it after a -F on either windows or linux. It calls QApplication::font().family() and QApplication::font().pointSize() to fill font family and font size respectively. There is a chance that there is a different font set at initialization than what the preferences is loaded with. If so, I'd love to update it to match but I have no idea where it might be.

Status active fixed

Fixed in branch master, commit 0eecb16566

fix #279503: "Apply" in prefsdialog without changes on Mac changes the fontfamily

See the comment in the code. Default font on Mac is private, that is why it doesn't exist in the QFontCombobox.

Possible improvement here could be to refill the QFontCombobox with ALL fonts (even private ones) everytime.