Default Font (FreeSerif) on linux and changing fonts

• Apr 30, 2017 - 10:10

It looks like musescore 2.0.3 on linux, at least on debian stretch (next stable, to be released), does not like default FreeSerif font. The thing is that MS always chooses bold version of this font, so changing bold/regular has no effect, all chars are always in bold. After turning on italics, I can set bold/non-bold and it works fine. Other fonts works fine too, at least about 20 other fonts installed on my system. But the default FreeSerif can't be made regular. And only in musescore, other programs (browsers, word processors, other things) are fine with this font.

So the question is either what to do with this font to let MS to be aware of regular version of it, or how to change fonts everywhere so some other font will be used (eg DejaVu Serif) instead of the default, in all places of a given score, and in other scores as well. Changing font for every element manually is quite a lot of work.

Thanks!


Comments

Do you have a separate version of this font installed, or are you allowing MuseScore to use its version? It should work fine with the provided version (built in to the application). Works fine on every Linux installation I've tried.

Anyhow, if there is something special about the particular distribution you are using that breaks this, and you cannot fix it by uninstalling the separate version of the font, you can indeed set things up to use another font by default. Go to Style / Text, change all the text styles however you like, use Style / Save Style to save the style to a file, then specify that file as the default style in Edit / Preferences / Scores.

In reply to by Marc Sabatella

Now that's interesting. I didn't know this font comes with Musescore, and thouht it uses system font, so I even tried several versions of it, to no avail.

_Uninstalling_ system font restores normal operations in musescore, so it is something with iteraction of musescore and system-provided FreeSerif font.

However, some other apps I use depend on this font, so I'm not sure what to do :)

But wait.. in my system, musescore comes with /usr/share/fonts/opentype/mscore.otf. I don't see other fonts in there, while they're present in the source in fonts/ directory. Apparently Debian package does not ship it. So musescore _always_ uses system-provided font, so when fonts-freefont-ttf package is not installed, musescore uses some _other_ font which works fine.

When this font isn't installed, musescore still displays all Free* fonts in its font list, so it does see FreeSerif, while other applications don't see it anymore. Why MS still lists them?

Also, I can drop *.ttf from musescore source dir to /usr/share/fonts/truetype, all these fonts appears in other apps and can be used just fine (all versions, - regular, bold, italic, bold italic), AND musescore becomes unable to display regular version of FreeSerif, only bold.

I can remove FreeSerifBold.ttf from system, and after this musescore does work as it should, but all other apps lses bold version of FreeSerif.

I'm not quite understand what's going on... And it looks like MS is the only application which is having problems with this _particular_ font.

In reply to by jeetee

Ah, this makes sense and describes why FreeSerif &Co remains available in MS after uninstalling these fonts from system. Also it becomes clear that qt prefers system fonts over built-in fonts when both are available.

This does not describe, however, why only musescore is having problem with only this font when it's installed on the system... Any idea where to look at? Is there a way to see how a font is being choosen?

In reply to by mjtm

Presumably something about the version you have installed is non-standard or otherwise not compatible with the Qt libraries we rely on. If you need FreeSerif for other programs, maybe download and install a different version of FreeSerif to see if you can find one that works better. Perhaps the one from the MuseScore source itself (on GitHub).

In reply to by Marc Sabatella

That's exactly what I did - used the version of FreeSerif font which comes with musescore itself, in the fonts/ directory. That one, when installed system-wide, also have the same problem, - only bold font, no regular, in musescore, all other programs works. I can delete /usr/share/fonts/truetype/FreeSerifBold.ttf and musescore works, but other programs loses the bold version.

The same happens when I install FreeSerifBold.ttf FROM MUSESCORE SOURCE to ~/.fonts/ - musescore loses regular version of this font.

It's enough to make FreeSerifBold.ttf available to the system (so that other programs see it) to make musescore unable to use regular version of it.

Do you still have an unanswered question? Please log in first to post your question.