Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blurry text Electron

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?

like image 820
user2248702 Avatar asked Sep 28 '16 13:09

user2248702


1 Answers

Try to set:

backgroundColor: '#FFF'

in the BrowserWindow constructor options.

The corresponding issue on Electron's tracker

like image 179
Kirill Gribunin Avatar answered Oct 14 '22 02:10

Kirill Gribunin