Text hinting causes ugly output
With small font size (e.g. 7pt), I have kerning issues. Most visible with Gentium Basic, but I think FreeSerif is affected as well. Problem is present with all variants.
GIT commit: f51dc11
Attachment | Size |
---|---|
Font_metric_issue.mscz | 3.11 KB |
Font_metric_issue.png | 9.22 KB |
Comments
What OS are you on? I don't see any issues with any of the text fonts we ship - FreeSerif, FreeSans, or MuseJazz - using a size of 7 point on Ubuntu 14.04.
Win7
Linux Libertine G looks ok. Times New Roman not, so might be for only certain fonts
If the fonts with that problem are not part of MuseScore, while those that are part of MuseScore don't have that problem, how are the MuseScore developers supposed to fix them?
Linux Libertine, Gentium Basic and Time New Roman are definitly not part of MuseScore. FreeSerif, FreeSans, or MuseJazz are, but don't have the problem.
For font rendering issues it doesn't matter at all what fonts are shipped with MuseScore (they are not part of MuseScore anyway). (If you would have read my bug report you could have seen that the problem appears with FreeSerif as well, so the situation is that MuseScore renders its bundled font bad).
I guess this is a FreeType or QT issue and/or the way MuseScore uses them.
Actually Linux Libertine is bad as well (for example between 'n' and 'i' character in italic)
Attached FreeSerif example
For the record, you originally said you *thought* Free Serif was affected, and since I couldn't reproduce, a natural assumption was that you were perhaps simply mistaken about that.
Anyhow, what is very possible is that there is a bug in FreeType or in Qt that is causing these specific fonts to not kern well at small sizes. However, it is also possible there is a bug in these fonts that cause some rendering engines to have problems with them. I'm not enough of a font expert to be able to say.
I notice all your screen shots are of italic fonts. Does the issue shows up also with upright fonts?
Ok, I tracked this down to be Windows specific, I guess this is related to https://musescore.org/en/node/43661 - Perhaps text parts were not fixed?
Attached FreeSerif upright examples from my machine and from musescore.com
Win7:
MuseScore.com:
Issue is there with latest nightly as well e342fda
This also shows that rendering will be (still) different on different platforms even with the same bundled font (also it is no so clearly visible, only when printing but larger font sizes are affected as well).
I used the Hello QML plugin to display text with Gentium Italic 7pt. I realised, that Qt draws that perfectly well and more beautiful than what is displayed on the MuseScore canvas (perhaps related to subpixel antialiasing). So I think this issue is a more generic problem about text rendering on Windows.
If in QML I switch to Text { ... renderType: Text.NativeRendering } I get the same ugly rendering.
Looks nice with Text.QtRendering
Perhaps this would get fixed in Qt 5.5? https://codereview.qt-project.org/#/c/107745/
Qt-5.5 is out since a while (and I once had a MuseScore build with it, see https://github.com/musescore/MuseScore/pull/2131), 5.5.1 should be out any day now.
I just realized that QML is irrelevant, as QML is using the GPU to render fonts (http://blog.qt.io/blog/2011/07/15/text-rendering-in-the-qml-scene-graph/) - would be nice though to switch all rendering to something like that.
I made some more investigation, tried with 5.5.1 - sill wrong. I think this is because in larger resolution QT uses the hinting metrics. This is documented in http://doc.qt.io/qt-5/qfont.html#HintingPreference-enum
is Qt 5.5.1 out already? I just checked and couldn't find it
I used http://download.qt.io/snapshots/qt/5.5/5.5.1/167/
Ah, OK, so not an official release but a release candidate or development build
In qt 5.6 it seems directwrite will be enabled, so that might make it possible for us to use the no hinting preference
Issue is still present with GIT commit: 90a7011
See https://github.com/musescore/MuseScore/pull/3298
Fixed in branch 2.2, commit 4e2647cbcc
fix #117191 and fix #82021 hack to correct font kerning under Windows
Automatically closed -- issue fixed for 2 weeks with no activity.