[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.

Found this thread with the help of a friend after trying the pinned rdewalt method and Lutris. The other two install methods largely worked fine, but had a goofy bug where the main font selector was inoperable and sometimes crashed the program. Scrivenix resolved that issue, so thank you for your work on this project! Also, I am a Linux noob transitioning away from Windows as of this week, so if I say anything super ignorant, apologies.

Scrivenix install works on Nobara 43 (KDE Plasma desktop version) (Wayland)

1440p and 1080p monitors –somewhere around 144dpi seems okay, but still tweaking UI & physical desk setup for a new PC

Here’s some notes from the install process:

udisks2

udisks2 caused me a bunch of anxiety, since it changed the ID and Vendor fields inside the pop-up dialogs for drive mounting. Other new users to Linux that are relying heavily on GUI might have a similar panic attack, thinking their system’s security became compromised. It might be helpful to make a note about this in the install directions or in the installer itself.

Possible Bazaar flatpak manager compatibility issues

The Scrivenix install seems to temporarily or irregularly break Bazaar, which is my OS’s suggested flatpak manager. On open, the program hangs for a litle bit, then closes. What little debugging I could figure out seemed to point to a bwrap issue. Here’s the few lines before the app closes:

F: Running '/usr/bin/bwrap --args 72 -- /usr/bin/xdg-dbus-proxy --args=75'
F: Running '/usr/bin/bwrap --args 72 -- bazaar '%U''
Failed to register: Timeout was reached

A PC restart found Bazaar back to normal & functioning, with Scrivenix listed in the GUI. Bazaar also seemed to properly notify me of necessary updates and handled them without error. However, the next time I tried to open Bazaar, it exhibited the same crash. (I didn’t debug, sorry!) I don’t have enough data yet to say if Scrivenix is causing this to happen, or if something else is the culprit. To note, I’ve also been having some (harmless?) bwrap issues with Steam that I haven’t gotten around to troubleshooting–unsure if related. If I had to hazard an ignorant guess, perhaps the manual install of a flatpak isn’t playing nice with how Bazaar likes to keep track of its installs, related files, and/or folders?

Accidental launch of multiple instances of Scrivenix

Accidentally launching a 2nd instance of Scrivenix causes it to lock up badly enough that both the processes and the window have to be terminated manually; the window, in particular, must be killed, even after the processes have ended. GUI prompts asking to terminate the window do absolutely nothing.

cabextract

Nobara comes with 1.11 already installed. Scrivenix installation failed as follows:

flatpak-builder --force-clean --install --user build-dir com.local.Scrivenix.yml
Downloading sources
Downloading https://www.cabextract.org.uk/cabextract-1.11.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Failed to download sources: module cabextract: The requested URL returned error: 403

Commenting out the cabextract section of the .yml allowed the installation to proceed. My troubleshooting friend, on ubuntu, also had the module installed on his system–so many future users might be affected by this. Could a version check & bypass be added for this step? (And, perhaps any other modules that an OS might already have installed?)

Fonts

Scrivener’s default UI fonts aren’t part of the Scrivenix install for me. Not sure if that’s intentional, or if my particular install failed in some way. As such, the entire UI defaults to Arial, which displays very poorly on my system–especially if the DPI is set too high or too low, or OS sub-pixel rendering is off. This is pretty rough to deal with during initial install, DPI tweaking, test-opening important projects, etc….

My OS had sub-pixel rendering OFF by default. Suggest telling the user to change that setting in their OS before starting the install. This should help visibility during the install and post-install configuration processes. My OS also features “hinting” options for fonts, set to “slight” by default. I barely notice a difference between the options at normal font sizes, but any users with this feature might want to play with it to see if it helps them.

Question: I’ve got a custom font I’d like to use if at all possible. Can this be done without breaking things? If so, what’s the process? (It’s already installed on my OS, but those fonts are not showing up in Scrivenix by default.)

That’s all I’ve got! Hope the text wall is useful in some way. Thanks again for the awesome work (and for inadvertently leveling my Linux knowledge up! ;P)

1 Like