You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No LCD-text-antialiasing anymore since Electron 1.2.0 (since the Chrome 51 update) #6344
Since Electron 1.2.0, that means since the update from Chrome 50 to Chrome 51, there no LCD-text-antialiasing anymore (tested only on Windows).
Here an animated GIF showing the difference (300% zoomed screenshots) - look at the 'To run...' text:
The text is now less sharp and slightly blurred...
NWJS has the same problem since updating to Chrome 51, but Chrome 51 itself is fine.
Due my own research it seems that the problem might be somehow related to some page/window background-color and/or transparency settings... (Chrome renders automatically with grayscale-antialiasing on transparent elements).
No, that doesn't help anymore - the 'page background-color workaround' was only working before Electron 1.2.0, but since this version there is always the grayscale-antialiasing...
@krpano I saw you said Chrome 51 itself worked fine, but I can also reproduce with Chrome 51, can you try again and verify you are using Chrome 51? If this is a bug of Chrome 51 we need to report it to upstream.
The strange thing is that this happens also to NWJS since they updated to Chrome 51 (and above).
So it seem that's somehow related to the way how Electron and NWJS are 'using' Chromium...
Just tried --enable-lcd-text and --disable-gpu again - no difference.
I think I have already tried all kind of Chromium switches (passed directly and via appendSwitch), no difference at all...
Verified this started to happening with the update to Chrome 51, cannot reproduce with Chrome 50.
This turns out to be a blocker for us to go with Electron 1.2.x (and likely for anyone that cares about a non-blurry UI). Since I cannot reproduce this in standalone Chrome I suspect this is an issue only for Electron/nw (as pointed out already).
Should we report this to Chrome to get some ideas where to look for?
@heronils I'm still seeing the blurriness with [email protected]. Using this code as recommended: mainWindow = new BrowserWindow({ backgroundColor: '#fff', ... Interestingly it works fine using npm start, but packaged using electron-packager - the blurriness returns:
@uotw, for completeness, what OS and what version of Electron-Builder?
I'm also seeing that I've lost subpixel antialiasing in a few places and only have grayscale antialiasing - which I'm (slowly) investigating now.
Neither of your images includes subpixel antialiasing, but only grayscale, which might be something to look into. If you're using the cssfilter property, that will affect antialiasing.
@uotw, for completeness, what OS and what version of Electron-Builder?
I'm also seeing that I've lost subpixel antialiasing in a few places and only have grayscale antialiasing - which I'm (slowly) investigating now.
Neither of your images includes subpixel antialiasing, but only grayscale, which might be something to look into. If you're using the cssfilter property, that will affect antialiasing.
MacOS 10.15.2, "electron-packager": "^14.1.1", no filter property in css. I have since found that on a different project, same MacOS/electron/electron-packager version I'm seeing no blurriness at all. Only difference between the projects that I can see is that window.devicePixelRatio is getting reported as 2 for the sharp version and 1 for the blurry version. Setting window.devicePixelRatio=2 in renderer.js doesn't change anything. Also, the entire window is blurry, including dev tools:
I do not think this is related to subpixel antialiasing. The differences are too extreme. There are quite a few results on goofle regarding MacOS blurry font.
Some talk about using -webkit-font-smoothing: subpixel-antialiased; in the css.
some talk about running in the terminal: defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO.
Unfortunately i am not on a Mac (and know nothing about them), so i can not help further here.
I do not think this is related to subpixel antialiasing. The differences are too extreme. There are quite a few results on goofle regarding MacOS blurry font.
Some talk about using -webkit-font-smoothing: subpixel-antialiased; in the css.
some talk about running in the terminal: defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO.
Unfortunately i am not on a Mac (and know nothing about them), so i can not help further here.
I tend to agree with you. Something idiosyncratic about this particular app too, not all electron apps on my platform. Disregard my issue. Thanks
If anyone should happen upon this, I tracked down the issue. MacOS had cached some electron settings in /Users/me/Library/Application Support/myapp/, so when I built my new app it was reading old settings. This problem does not apply when the app is located in /Applications, ostensibly because MacOS pays attention to versioning? Not exactly sure. Either way, you can fix the issue several ways:
delete the settings folder
rename your project directory
move the built app to a different directory (/Applications)
I've noticed that after upgrading to [email protected] from Electron 8.x, the subpixel antialiasing has become brutally hard to read for us. I'm trying to offer users a way to disable it if they desire, but there's no way to set a transparent background color for non-transparent windows.
Is there anything we can do to force whole-pixel antialiasing to make our app legible again for our users? Trying -webkit-font-smoothing: antialiased has no effect unfortunately. Even setting none for that has no effect. Using text-shadow also makes no difference.
A lot of things looks really crummy in our app. Surely there's some way to disable subpixel-antialiasing? Subpixel looks a lot better in most cases, but with italics or with backgrounds that aren't white/off-white, it can be counterproductive at best in my testing.
I've searched and searched, tried all I can think of, but found no resolution for this. Can anybody suggest a way to optionally disable subpixel-antialiasing?
With subpixel
100% zoomed:
200% zoomed:
600% zoomed:
Without subpixel (in a previous version of Electron)**
It's weird, it seems like maybe the blurriness occurs when the system runs low on memory on Windows. I don't know why that would do it though. Not actionable for now.
Activity
zcbenz commentedon Jul 5, 2016
I tested with Chrome 51, but it also seems to use greyscale antialiasing:

I verified that LCD text antialiasing is enabled.
anaisbetts commentedon Jul 5, 2016
What happens if you set the background of your page to
#fffexplicitlykrpano commentedon Jul 5, 2016
No, that doesn't help anymore - the 'page background-color workaround' was only working before Electron 1.2.0, but since this version there is always the grayscale-antialiasing...
anaisbetts commentedon Jul 5, 2016
@krpano Gotta use a debugger
zcbenz commentedon Jul 6, 2016
@krpano I saw you said Chrome 51 itself worked fine, but I can also reproduce with Chrome 51, can you try again and verify you are using Chrome 51? If this is a bug of Chrome 51 we need to report it to upstream.
krpano commentedon Jul 6, 2016
I have just tested again and yes - all Chrome versions are fine for me, I have tested Chrome 48 to Chrome 53-dev (all on Windows 7x64).
Here two screenshots:
Chrome 50:


Chrome 51:
krpano commentedon Jul 6, 2016
The strange thing is that this happens also to NWJS since they updated to Chrome 51 (and above).
So it seem that's somehow related to the way how Electron and NWJS are 'using' Chromium...
zcbenz commentedon Jul 6, 2016
Can you try passing
--enable-lcd-textand--disable-gpuwhen running Electron and see if it makes a difference?bpasero commentedon Jul 6, 2016
I can reproduce this with VS Code updating to Electron 1.2.6 on Windows 10.
krpano commentedon Jul 6, 2016
Just tried --enable-lcd-text and --disable-gpu again - no difference.
I think I have already tried all kind of Chromium switches (passed directly and via appendSwitch), no difference at all...
bpasero commentedon Jul 6, 2016
Verified this started to happening with the update to Chrome 51, cannot reproduce with Chrome 50.
This turns out to be a blocker for us to go with Electron 1.2.x (and likely for anyone that cares about a non-blurry UI). Since I cannot reproduce this in standalone Chrome I suspect this is an issue only for Electron/nw (as pointed out already).
Should we report this to Chrome to get some ideas where to look for?
zcbenz commentedon Jul 6, 2016
@bpasero Yeah ideas from Chrome developers would be very helpful.
21 remaining items
fix blurry text on Windows platforms
nilslindemann commentedon Jun 30, 2019
It is now in the FAQ
uotw commentedon Jan 30, 2020
@heronils I'm still seeing the blurriness with [email protected]. Using this code as recommended:
mainWindow = new BrowserWindow({ backgroundColor: '#fff', ...Interestingly it works fine usingnpm start, but packaged using electron-packager - the blurriness returns:Nantris commentedon Jan 30, 2020
@uotw, for completeness, what OS and what version of
Electron-Builder?I'm also seeing that I've lost subpixel antialiasing in a few places and only have grayscale antialiasing - which I'm (slowly) investigating now.
Neither of your images includes subpixel antialiasing, but only grayscale, which might be something to look into. If you're using the
cssfilterproperty, that will affect antialiasing.uotw commentedon Jan 30, 2020
MacOS 10.15.2, "electron-packager": "^14.1.1", no filter property in css. I have since found that on a different project, same MacOS/electron/electron-packager version I'm seeing no blurriness at all. Only difference between the projects that I can see is that window.devicePixelRatio is getting reported as 2 for the sharp version and 1 for the blurry version. Setting window.devicePixelRatio=2 in renderer.js doesn't change anything. Also, the entire window is blurry, including dev tools:
nilslindemann commentedon Jan 31, 2020
I do not think this is related to subpixel antialiasing. The differences are too extreme. There are quite a few results on goofle regarding MacOS blurry font.
Some talk about using
-webkit-font-smoothing: subpixel-antialiased;in the css.some talk about running in the terminal:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO.Unfortunately i am not on a Mac (and know nothing about them), so i can not help further here.
uotw commentedon Jan 31, 2020
I tend to agree with you. Something idiosyncratic about this particular app too, not all electron apps on my platform. Disregard my issue. Thanks
uotw commentedon Jan 31, 2020
If anyone should happen upon this, I tracked down the issue. MacOS had cached some electron settings in /Users/me/Library/Application Support/myapp/, so when I built my new app it was reading old settings. This problem does not apply when the app is located in /Applications, ostensibly because MacOS pays attention to versioning? Not exactly sure. Either way, you can fix the issue several ways:
Fix text is blurry on Windows (#605)
Nantris commentedon May 14, 2021
I've noticed that after upgrading to [email protected] from Electron 8.x, the subpixel antialiasing has become brutally hard to read for us. I'm trying to offer users a way to disable it if they desire, but there's no way to set a transparent background color for non-transparent windows.
Is there anything we can do to force whole-pixel antialiasing to make our app legible again for our users? Trying
-webkit-font-smoothing: antialiasedhas no effect unfortunately. Even settingnonefor that has no effect. Usingtext-shadowalso makes no difference.Nantris commentedon May 25, 2021
Bump.
A lot of things looks really crummy in our app. Surely there's some way to disable subpixel-antialiasing? Subpixel looks a lot better in most cases, but with italics or with backgrounds that aren't white/off-white, it can be counterproductive at best in my testing.
I've searched and searched, tried all I can think of, but found no resolution for this. Can anybody suggest a way to optionally disable subpixel-antialiasing?
With subpixel
100% zoomed:

200% zoomed:

600% zoomed:

Without subpixel (in a previous version of Electron)**
100% zoomed:

200% zoomed:

600% zoomed:

nornagon commentedon Jun 17, 2021
@slapbox would you be able to open a new issue with a minimal gist that shows the issue? Thanks!
Nantris commentedon Aug 20, 2021
It's weird, it seems like maybe the blurriness occurs when the system runs low on memory on Windows. I don't know why that would do it though. Not actionable for now.
RJVB commentedon Sep 24, 2021
Same thing with Franz; see https://github.com/meetfranz/franz/issues/1923 (annoyingly the fix no longer works with Franz v5.7.0 :( )
Qiming-Liu commentedon Dec 12, 2021
My system is Win10 x64. The menu bar is very blurry and hard to see. backgroundColor:'#FFF' has been set but not work.