-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
On the left is Logseq windows desktop and the right is logseq in web browser
Looks blurry but I think it might just be stuck in grayscale anti-aliasing where the rest is in RGB subpixel mode as stated on a lot of github issues about this with Electron apps
Expected behavior
Working subpixel mode to render crisp text and be easy to read
Failed workarounds
--disable-gpuin cmd line-webkit-font-smoothingin css with different optionstext-rendering: optimizeLegibilityand other parameters- Change options GPU Nvidia
- Cleartype (doesn't impact Electron rendering anyway)
- Replaced Inter font by "Inter Hinted for Windows" in %appdata%
- Trying other fonts
- Logseq in Chromium based browsers
- Logseq in Firefox
Firefox is the only way of having proper font rendering, but unable to use because of API needed to access local files
2 Potentially working solutions
1) Electron issue
It appears there is an Electron "issue" or "feature" that is known and affects other software like VSCode, I can confirm it is the same on this windows workstation
Sub-pixel anti-aliasing needs a non-transparent background of the layer containing the font glyphs
The solution as stated on there website is to implement
const { BrowserWindow } = require('electron')
const win = new BrowserWindow({
backgroundColor: '#fff'
})
I could not test it as I don't know how to
See here for details
- https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
- No LCD-text-antialiasing anymore since Electron 1.2.0 (since the Chrome 51 update) electron/electron#6344 (comment)
- Fix subpixel rendering in desktop client element-hq/element-web#12443
- https://community.bitwarden.com/t/improve-font-rendering-in-desktop-app-by-setting-electron-background/16430
2) Chromium issue
It could be an issue with DirectWrite specific to Windows
I could not test it as I don't know how to
See here for details:
- https://bugs.chromium.org/p/chromium/issues/detail?id=1160271#c4
- https://www.change.org/p/google-inc-bring-sharp-fonts-back-in-google-chrome-disable-directwrite
- https://www.ghacks.net/2016/06/06/chrome-font-rendering-google/
Note
It is really subtle, but bad enough that it is hard to read sometimes and make me wonder if I had an issue with my screen
I can give feedback on pre-release if needed
