Skip to content

Electron font rendering looks blurry in W10 #2813

@Mispille

Description

@Mispille

On the left is Logseq windows desktop and the right is logseq in web browser

normal vs firefox

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-gpu in cmd line
  • -webkit-font-smoothing in css with different options
  • text-rendering: optimizeLegibility and 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

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions