incorrect fonts used when system Qt version is 5.13 or higher
Reported version
3.x-dev
Type
Graphical (UI)
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
won't fix
Regression
Yes
Workaround
Yes
Project
When running the latest stable or dev version of MuseScore on a Linux system featuring Qt version 5.13 or higher, fonts in MuseScore are not displayed correctly. I have verified this happens in both Manjaro (presumably also Arch) and KDE neon, which currently use Qt 5.13.0 and 5.13.1 respectively.
Here is what MuseScore looks like using Qt 5.12.3:
Here it is using Qt 5.13.1:
You can see the FreeSerif font is not being used, despite it being selected in style preferences. This does not affect the AppImage version of MuseScore, but does affect versions from the system repository (or Ubuntu/neon PPA) and compiled from source, including the latest git.
Comments
Is it only FreeSerif that is affected? I wonder if somehow that font specifically has an issue? Or the problem has to do with the font selection process somehow.
I just tested trying to use other fonts for text, and no font I select seems to work, always appearing as it does in the second screenshot above.
I discovered a workaround for this issue that involves installing Qt version 5.12 and telling MuseScore to use this instead of the system Qt version. Using the MuseScore AppImage also gets around the problem, but then I am bothered by slow mouse wheel scrolling due to the AppImage being built with Qt 5.9. If you are not bothered by this issue, then using the AppImage is certainly the easier workaround.
If, like me, you prefer to use MuseScore from repository/PPA or compile from source, here is how to fix the fonts:
LD_LIBRARY_PATH="/home/username/Qt/5.12.5/gcc_64/lib/" mscore3
If this works, you can modify your MuseScore launcher according to your desktop environment's instructions. Plasma 5 users can simply right-click the K menu and choose "Edit Applications...". If your launcher command is:
mscore3 %F
...simply prefix this with the LD_LIBRARY_PATH variable like so:
LD_LIBRARY_PATH="/home/username/Qt/5.12.5/gcc_64/lib/" mscore3 %F
In reply to Is it only FreeSerif that is… by Marc Sabatella
I think I have a related problem. I'm opening a v2 file in v3.2.3.7635. I then try to change text font from Muse jazz to Emmentaler, to no effect. Even though the score style shows Emmentaler and Emmentaler Text, text continues to display in Muse jazz. Even text added after changing the style setting continues to display in Muse jazz. I saved the file as .mscx, manually changed all the fontface nodes to Emmentaler Text and reopened the file. Now the text is all in sans-serif.
[this on windows 10 and QT 5.12.2]
No, that's not related - this issue is specifically about Qt 5.13, which we do not currently support. Probably your text has custom formatting applied via the text toolbar that you need to remove first. Impossible to do more than guess without the score, though. Best to ask for help on the Support forum and attach the score so we can understand and assist better.
I think this is a general problem in Qt 5.13. I have written a Qt application in Qt 4 and ported it to different Qt versions over the years. Compiled with Qt 5.12 it does not display the correct font. Same source compiled with Qt 5.12 and is working.
In reply to I discovered a workaround… by s.chriscollins
I have discovered that my workaround doesn't work if MuseScore was actually compiled using Qt 5.13. It worked with the earlier version of the KDE neon package I was using that was compiled using Qt 5.12.3, but fails to launch with the latest package when using LD_LIBRARY_PATH.
We don't know what exactly has changed in Qt 5.13 that would account for this malfunction? Would it make sense to reach out to the Qt folk?
A web search brought up https://forum.qt.io/topic/105304/project-error-library-freetype-is-not-… Any chance that would be related?
Still actual?
I cannot currently test this for 3.6, as the latest MuseScore version available in DEB format for Ubuntu is still 3.2.3. As mentioned in the OP, this bug does not affect the AppImage version, as that version does not use system Qt libraries.
We won't fix Ubuntu's DEB packages