[BETA TESTERS WANTED] Scrivenix — Automated Flatpak Installer for Scrivener 3 on Linux

Nitram3

Another question: Can you check in your KDE settings and tell me what your subpixel settings are?

I think it is in the settings at: KDE System Settings → Fonts → Configure → Sub-pixel rendering, but I’m not 100% sure.

It should be set to one of these:

  • RGB — horizontal RGB (most common, standard for most monitors)
  • BGR — horizontal BGR (some laptop panels, including many Asus)
  • VRGB — vertical RGB (rare, rotated displays)
  • VBGR — vertical BGR (rare, rotated displays)
  • None — no sub-pixel rendering, just grayscale antialiasing

Anti-Aliasing:

  • Enable
  • Exclude range from anti-aliasing

Sub-pixel rendering: RGB
Hinting: Slight

Panel is 4.00 inch 16:10, 2560 x 1600 pixel 216 PPI, IPS, 60 Hz
Fedora KDE is: 170%, anti aliasing enabled, hinting full
Wine config is: 216 dpi

Comparisons provided below. NB, the fonts reported in the screenshots are both Georgia despite what the toolbar says because the cursor is positioned in the notes or binder.

In the meantime is there any way to give Scrivinex access to the KDE fonts? Had a try with flatseal but couldn’t get it to work.

So 170% is an odd scaling factor and I think it could be a part of the problem. What happens if you drop back to 150%? Any change?

Regardless, let’s try giving Scrivener access to those Linux native fonts and see if they render more to your liking:

find /usr/share/fonts \( -name "*.ttf" -o -name "*.otf" \) -exec cp -n {} ~/.var/app/com.local.Scrivenix/wine/drive_c/windows/Fonts/ \;
  flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wineboot com.local.Scrivenix

That will copy the fonts from the usr/share/fonts directory into the Scrivenix sandbox and then prompt Wine to refresh. Then you ought to be able to relaunch Scrivenix and see those fonts available. You can then go to File>Options>Appearance and work your way down through all the lefthand tabs to change the fonts for the binder, menus, notecards, etc to a native font and see how it does for you.

Let me know. If this fixes it, maybe I can build it into the script file for future builds.

1 Like

@nitram3
RGB sub-pixel rendering is what Wine’s ClearType expects, so that rules out one possible cause.

The next test is to disable Wine’s font smoothing entirely and let KDE’s FreeType render natively. Run this with Scrivenix closed, then relaunch:

flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wine com.local.Scrivenix reg add “HKCU\Control Panel\Desktop” /v FontSmoothing /t REG_SZ /d 0 /f

If fonts look noticeably better, it confirms Wine’s ClearType is conflicting with KDE’s hinting pipeline and we can tune from there.

To revert if it looks worse:

flatpak run --env=WINEPREFIX=$HOME/.var/app/com.local.Scrivenix/wine --command=wine com.local.Scrivenix reg add “HKCU\Control Panel\Desktop” /v FontSmoothing /t REG_SZ /d 2 /f

One side note: The grayscale test earlier locking your DPI to 144 was unexpected behavior, so if the DPI locks again after this test just run the revert command and let me know.

1 Like

The command gave a bunch of errors.

002c:err:winediag:getaddrinfo Failed to resolve your host name IP
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).
0078:fixme:seh:WerSetFlags (2) stub
0078:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented!
0084:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
0084:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00006FFFFEE825B7, 28) stub
0084:fixme:ver:GetCurrentPackageId (00007FFFFF01EB50 0000000000000000): stub
00a8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00a8:fixme:seh:WerSetFlags (2) stub
00a8:fixme:heap:RtlSetHeapInformation HEAP_INFORMATION_CLASS 1 not implemented!
00b4:fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
00b4:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 7B003241, 28) stub
00b4:fixme:ver:GetCurrentPackageId (012EECCC 00000000): stub
00d0:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c00000e5
0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebth" failed to start: 1359
reg: Invalid system key

I’ve checked anyway, but it looks similar to me, but I am unsure because I played around a lot with different fonts.
Can someone please tell me what the default fonts are that Scrivener uses for the UI?

Segoe UI is the default UI font for the Windows variant of Scrivener.

2 Likes

Thanks. Yea, it’s exactly the same. The command didn’t work.