Skip to content

No LCD-text-antialiasing anymore since Electron 1.2.0 (since the Chrome 51 update) #6344

Closed

Description

@krpano

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:
lcd-text-antialiasing
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).

Activity

  1. zcbenz commented on Jul 5, 2016

    @zcbenz
    Contributor

    I tested with Chrome 51, but it also seems to use greyscale antialiasing:
    screen shot 2016-07-05 at 10 03 14 am

    I verified that LCD text antialiasing is enabled.

  2. added
    blocked/need-info ❌
    on Jul 5, 2016
  3. anaisbetts commented on Jul 5, 2016

    @anaisbetts
    Contributor

    What happens if you set the background of your page to #fff explicitly

  4. krpano commented on Jul 5, 2016

    @krpano
    Author

    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...

  5. anaisbetts commented on Jul 5, 2016

    @anaisbetts
    Contributor

    @krpano Gotta use a debugger

  6. zcbenz commented on Jul 6, 2016

    @zcbenz
    Contributor

    @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.

  7. krpano commented on Jul 6, 2016

    @krpano
    Author

    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:
    chrome50
    Chrome 51:
    chrome51

  8. krpano commented on Jul 6, 2016

    @krpano
    Author

    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...

  9. zcbenz commented on Jul 6, 2016

    @zcbenz
    Contributor

    Can you try passing --enable-lcd-text and --disable-gpu when running Electron and see if it makes a difference?

  10. bpasero commented on Jul 6, 2016

    @bpasero
    Contributor

    I can reproduce this with VS Code updating to Electron 1.2.6 on Windows 10.

  11. krpano commented on Jul 6, 2016

    @krpano
    Author

    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...

  12. bpasero commented on Jul 6, 2016

    @bpasero
    Contributor

    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?

  13. added and removed
    blocked/need-info ❌
    on Jul 6, 2016
  14. zcbenz commented on Jul 6, 2016

    @zcbenz
    Contributor

    @bpasero Yeah ideas from Chrome developers would be very helpful.

  15. 21 remaining items

  16. added a commit that references this issue on Feb 22, 2019
  17. nilslindemann commented on Jun 30, 2019

    @nilslindemann

    It is now in the FAQ

  18. uotw commented on Jan 30, 2020

    @uotw

    It is now in the FAQ

    @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:

    npmStart

    packaged

  19. Nantris commented on Jan 30, 2020

    @Nantris
    Contributor

    @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 css filter property, that will affect antialiasing.

  20. uotw commented on Jan 30, 2020

    @uotw

    @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 css filter 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:

    Screen Shot 2020-01-30 at 3 34 41 PM

  21. nilslindemann commented on Jan 31, 2020

    @nilslindemann

    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.

  22. uotw commented on Jan 31, 2020

    @uotw

    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

  23. uotw commented on Jan 31, 2020

    @uotw

    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)
  24. added a commit that references this issue on Mar 13, 2020
  25. Nantris commented on May 14, 2021

    @Nantris
    Contributor

    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.

  26. Nantris commented on May 25, 2021

    @Nantris
    Contributor

    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:
    image

    200% zoomed:
    image

    600% zoomed:
    image

    Without subpixel (in a previous version of Electron)**

    100% zoomed:
    image

    200% zoomed:
    image

    600% zoomed:
    image

  27. nornagon commented on Jun 17, 2021

    @nornagon
    Contributor

    @slapbox would you be able to open a new issue with a minimal gist that shows the issue? Thanks!

  28. Nantris commented on Aug 20, 2021

    @Nantris
    Contributor

    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.

  29. RJVB commented on Sep 24, 2021

    @RJVB

    I've noticed that after upgrading to [email protected] from Electron 8.x, the subpixel antialiasing has become brutally hard to read for us.

    Same thing with Franz; see https://github.com/meetfranz/franz/issues/1923 (annoyingly the fix no longer works with Franz v5.7.0 :( )

  30. Qiming-Liu commented on Dec 12, 2021

    @Qiming-Liu

    image

    My system is Win10 x64. The menu bar is very blurry and hard to see. backgroundColor:'#FFF' has been set but not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions