Compile to PDF Font Hinting Distortions

I decided to have a quick look here, rwfranz, because you noted on the other report that you didn’t see it yourself, though it’s clearly happening for kej2u.

I found out how to replicate it, and I found out something bad which is also a bug in current compile.

Trying a number of combinations, here’s what dropped out:

  1. with single spacing of the Scriv document, I didn’t see the font splitting, on a couple of files
  2. but after tryiing a number of combinations, I did replicate
  3. If, like both reports, you set double (2.0) line spacing on the document, bingo: the splitting occurs
  4. I tested and found the splitting on both Compile to PDF and Compile to Print -> normal Microsoft PDF printer
  5. This last test turned up another big problem with Compile in its present state.
  6. The extra problem is a serious interaction with Font Hinting setting, as for our improved screens
    [list=a]
    [*]on Compile to Print -> Microsoft PDF printer, this problem is not observed
  7. But on Compile to PDF, with Font Hinting unchecked and Scrivener necessarily restarted, big distortion
  8. The font in the PDF is distorted to become larger than it should be, perhaps mainly in height
  9. It’s also become far too heavy, like a mis-calibrated Bold
  10. The font has lost its proper kerning, so that letters are too close together and overlap
  11. If you return Font Hinting to checked and restart Scrivener, then these PDF distortions don’t occur
    [/*:m][/list:o]

So I would say that two problems should be Listed. That would be the original font-splitting issue, now that we know how to repeat it, and this new issue with Font Hinting and Compile to PDF.

Given the improvement in screen clarity with Font Hinting unset, plus this Compile to PDF issue when it is set, I’d like to suggest that defaulting it to be unset for editors, but forcing it behind the scenes to be set duriing Compile to PDF action would be a quite reasonable solution to speed getting through this period and getting out the release.

Persons who preferred the spindlier screen appearance with Font Hinting set could simply check the box in their own options, for now. All the deeper issues could be postponed for a relaxed post-release exploration – or Qt fix , etc…

Best I would think of, anyway…

Hi Clive,

As this contains a separate bug from the one filed in the other thread, I’ve split it off for it’s own topic.

I was not able to replicate this using just the information provided, could you tell me what fonts/compile formats are causing this distortion for you? Or possibly send a small sample project showing the issue?

Thank you for your help with this.

Ok, I’ve made such a project, attached as a zip.

You’ll note there are four small documents, showing what happens with different fonts.

I’ve also included Scriv compile-to-PDF results with and without Font hinting checkmarked in Options|Editing

With Font hinting unchecked, we get the great accurate screen appearance, but in compile output, it’s not good:

  • the most dramatic is with (Adobe) Minion Pro, which you may have
  • less dramatic, but same in qualities with Times Roman, which I’m sure you have
  • still existing but more subtle, with Calibri
  • of interest, Minion Pro Bold appearance with the issue looks identical to Minion Pro

With Font hinting checked, then screen appearance is spindly etc., but compile output is accurate.

This is why I suggest that to get the release out, a sensible fix would be:

  • default Font hinting to unchecked, in Options|Editing, to get the screen to be good
  • programatically turn it on regardless of Options setting, when compiling, then return to whatever Options determines
  • this is easy and should be solid
  • the person who doesn’t like full font appearance on screen can just check Font hinting
  • this leaves actually investigating/getting a fix out of Qt/etc. to be done over a comfortable, relaxed time

You’ve seen the justification for the better-screen setting, and below is justification for fully handling the issues. It’s from the Minion font printing example, and for anyone shocked, it’s not so severe for Times Roman, less even for Calibri, but you still wouldn’t want it.

Best on this, Bryan, greetings to Tiho and Lee also,
Clive


hinting-compile-issue.zip (164 KB)

It’s fairly visible in Times New Roman (the letters get really crowded).

This is in compile to PDF (not to print using print to PDF), Manuscript (times).

It looks to me as though the fonts are larger with hinting off, but the spacing is the same as with hinting on. It’s a bit strange (font hinting shouldn’t change type size).

(text is from a random text generator I found on the 'Net)

As I mentioned, it’s also visible in Noto Serif, but it’s harder to see.

Hinting on:

And off:

Same problem in 2.9.9.14