Thoughtfulness keeps my words just to the specifics about this, which leaves a good story to tell.
- There was such a lot of misinformation, and I felt how over-worked @lee and @tiho_d must be, so in brief, I looked up present states of the Qt framework at the heart of Windows Scrivener, and made the bet of downloading the development environment. And kept adding what’s necessary, as even that is shall we say, tricky.
- I did this mainly because I’d found there was a styling text editor as one of its demo projects, in effect a mini-model of Scrivener. I got that to build, and tried the same collection of fonts with text that you can find pictures of in the recent Fonts Scrivener postings.
- The result immediately: the test texts had just the same poor look as in Scrivener 22. Yes. Identical. So the issue isn’t nor following supposed patterns in the Qt software. Points for Lee and Tiho.
Then, Qt has been very well known for years as having, shall we say, issues, about making clean rich text. Miracle solutions have been built and deposed. Their own screenshots always are in mono fonts, and still look rough. We won’t speculate the possible reasons, but we can look into what they seem to have. Or, maybe…
- What I actually found is that their development environment doesn’t go far – in particular, reading out values in their data structures in active code was going to be pretty much a manual proposition. Somehow in a developed resistive sensibility to this sort of thing, and with growing hunger, I decided instead to plug some values in, see what I got.
- I arranged this, as the code picture will show, by inserting instructions into menu operation of the Editor. While it was changing a font size, then it was also setting how to handle font hinting, which along with true anti-aliasing gone missing, looked a clear symptom in view well to attack.
- First I put in what documentation suggested Tiho ‘should have at some much earlier point’:
QFont::PreferFullHinting, And guess what? No change, which indicates that he or default wisely taken did this.
Then comes the place that experienced skulduggery gets you somewhere, though. So that I can get back out of this software, regain a faction of my Sunday, and return to the fiction whose scatter of notes the phrases we test arrived from…
- So, I plugged in an oppositional
QFont::PreferNoHinting. This ‘should’ be exactly the wrong thing to do. Except we may reckon something about real software’s actual ranges of vagaries.
- The result, you can see below. Remarkable improvement.
- The rendering may even be as ‘right’ as it’s going to get in small sizing and on Windows, and on non-Mac-level screens. It’s great. It looks like the Word rendering, quite possibly better (and yes, better is possible, as that Word has its own kinks is well known). Both anti-aliasing and hinting are properly in use.
Conclusion. I believe that this value can be set as the application default for font rendering, up front in the program code.
- I tried it in this model on the most problematic of the test fonts, each turned to looking good, looking readable at a glance. Even the blockiness-helped Calibri is nothing but rather visibly improved.
- Why it does this can be reckoned at a distance of time, after a successful RC, or dare we speak it, comfort for release.
- The real reason may turn out to be that this flag releases Windows to do its own job properly again – or, other…
- But if Tiho finds it does the job for now, as it seems to, why not?
Ok, the pictures.
The first is of this demo Text Editor, with my test text inserted above its default, left for veracity. You should ignore the font name in the UI, as it comes back one off from the one you set - another little pre-packaged fault.
The spindly and uneven top phrase is in Minion Pro, actually a pretty robust font of its nature from Adobe, 12 point size for consistency of all tests, and yes, again, Windows screens show fonts smaller than paper unless you magnify.
The kicker is in the second phrase. It’s exactly the same, 12 point Minion Pro. With the difference that this time it’s antialiased so it has substance to the eye, and yes, it’s also following hinting, so that it places each letter optically where it should be for your smooth reading. Nice, isn’t it. This is what Scrivener deserves, so that in all eyes, it shines, no?
As before, the picture you see here in the forum is also wrong-sized and a bit fuzzy, because of how your browser treats forum images, badly magnifying them. So I’ll give the link to download the real screen image first, which you can then see full truth from, opened in your proper image editor (not MS Photo with its similar problems, thank you).
Ok, then, here is a link to the place on the Qt documentation page for the flags available, and the one I used to fix this:
And last, a screenshot of the development editor, showing where i inserted the call in the Font Size menu action, just above the red dots, which were debug points.
It’s re-magnified and fuzzy too, just not so much, having started out larger: So it gets the real image download first also…