13

I have has some issues with text and icon fonts looking blurry in an electron application. I have tested the same HTML page in Chrome and the text and icon font look much crisper.

Chrome and Electron

After zooming the image I can see that Chrome is using subpixel rendering but Electron is only rendering in grayscale. I have tried using -webkit-font-smoothing: subpixel-antialiased; but it does not seem to change anything.

Subpixel rendering

Chrome Browser version: 53.0.2785.116
Electron version (process.versions.electron): 1.4.1
Electron Chrome version (process.versions.chrome): 53.0.2785.113

What causes this and how should I fix it?

user2248702
  • 2,741
  • 7
  • 41
  • 69

1 Answers1

2

Try to set:

backgroundColor: '#FFF'

in the BrowserWindow constructor options.

The corresponding issue on Electron's tracker

  • 1
    It is also now in the [FAQ](https://github.com/electron/electron/blob/master/docs/faq.md#the-font-looks-blurry-what-is-this-and-what-can-i-do) – Nils Lindemann Jun 30 '19 at 09:59