Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Text Rendering on macOS changed with Electron 3.0 #19356

Closed

Description

@as-cii

As reported in #18916 (comment), we observed a significant change in how text is rendered on a High-DPI display on macOS after upgrading Atom to use Electron >= 3.0.

Below you can find a zoomed-in screenshot of rendering the word Lorem in a variety of environments. Please, click on all of the images and quickly browse through the tabs to appreciate how stark the difference is for this pull request.

Atom on Electron 3

Atom on Electron 3 0

VS Code on Electron 3 (latest published version)

VS Code

Atom on Electron 2 (Atom 1.38.0-beta0)

Atom on Electron 2 0

Lorem on TextEdit

Screen Shot 2019-05-17 at 16 46 27

You can reproduce the above tests by using Fira Code Retina, 15px.

Causes of the change

We believe the change was caused by upgrading to a newer Chromium version, but it is unclear whether the new rendering is wrong or not. Specifically, this seems to be related to the global "Use font smoothing when available" setting on macOS, and Atom is now just honoring that configuration. Indeed, when rendering the word Lorem in TextEdit (a native macOS application), we observe the same rendering as in Atom on Electron 3.

Next steps

@rafeca and I discussed what to do about this, and it seems okay to proceed with allowing this new rendering behavior. Users can go back to the previous behavior by adding the following CSS to their personal style sheet:

/* This will change how font-smoothing is applied to the entire Atom application */
atom-workspace {
  -webkit-font-smoothing: antialiased;
}

/* If you just want to change how text is rendered within the editor, use this instead: */
atom-text-editor {
  -webkit-font-smoothing: antialiased;
}

If needed, in the future we could provide a configuration parameter to change the aliasing behavior without needing to write any CSS.

Activity

  1. added
    mac
    on May 17, 2019
  2. jasonrudolph commented on May 17, 2019

    @jasonrudolph
    Contributor

    @rafeca and I discussed what to do about this, and it seems okay to proceed with allowing this new rendering behavior.

    I agree. 🚀

  3. nathansobo commented on May 17, 2019

    @nathansobo
    Contributor

    Agreed. Amazing attention to detail catching this, however. Glad we could make this decision explicitly rather than accidentally.

  4. net commented on May 24, 2019

    @net

    I greatly prefer the new rendering. 🎉

  5. added
    electron-3
    on May 31, 2019
  6. as-cii commented on Jun 5, 2019

    @as-cii
    ContributorAuthor

    Given our agreement on accepting Electron's new text rendering system on macOS, I will go ahead and close this.

  7. vertic4l commented on Jun 12, 2019

    @vertic4l

    Couldn't find the option for "Use font smoothing when available" but adding the css from @as-cii helped to get the much nicer looking font rendering back.

    Although -webkit-font-smoothing: antialiased; should be default...

    Who wants an ugly rendered font for real?

    (Atom Beta 1.39)

  8. Aerijo commented on Jun 12, 2019

    @Aerijo
    Contributor

    Couldn't find the option for "Use font smoothing when available"

    That's an OS setting, not an Atom setting.

    Who wants an ugly rendered font for real?

    It's beauty is subjective. But it matches TextEdit, the text editor provided by Apple. So there is precedence.

    I do think a setting in Atom would help people with discovering there is a choice though.

  9. vinkla commented on Jul 1, 2019

    @vinkla
    Contributor

    Toggling Use font smoothing when available in System Preferences seems to work in TextEdit but not in Atom Nightly:

    Screen Recording 2019-07-01 at 22 35 18

    Atom: 1.40.0-nightly19
    macOS: 10.14.5

  10. as-cii commented on Jul 2, 2019

    @as-cii
    ContributorAuthor

    @vinkla thank you for the feedback. Does the setting take effect if you restart Atom? If not, did you try adding that CSS snippet to your personal style sheet?

  11. vinkla commented on Jul 2, 2019

    @vinkla
    Contributor

    Does the setting take effect if you restart Atom?

    No.

    If not, did you try adding that CSS snippet to your personal style sheet?

    Yes, this works.


    Maybe we should remove or alter the line below in #19356 (comment)?

    Users can go back to the previous behavior by disabling "Use font smoothing when available"

  12. as-cii commented on Jul 2, 2019

    @as-cii
    ContributorAuthor

    Maybe we should remove or alter the line below in #19356 (comment)?

    @vinkla: Sounds good, I just modified it to not mention the "Use font smoothing when available" option. It's strange because I remember toggling that option worked, but maybe something has changed since then.

  13. vinkla commented on Jul 22, 2019

    @vinkla
    Contributor

    The rendering seems to have returned to the previous behaviour (antialiased) with the merge of #19373. This can be tested in the latest nightly build: v1.41.0-nightly1.

  14. HaoyangFan commented on Jul 26, 2019

    @HaoyangFan
  15. Arcanemagus commented on Jul 26, 2019

    @Arcanemagus
  16. lock commented on Jan 24, 2020

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  17. locked as resolved and limited conversation to collaborators on Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-renderingelectronelectron-3mac

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions