Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text looks blurry #407

Open
aqt opened this issue Dec 4, 2022 · 0 comments
Open

Text looks blurry #407

aqt opened this issue Dec 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@aqt
Copy link

aqt commented Dec 4, 2022

Describe the bug
Text is rendered with grayscale anti-aliasing rather than sub-pixel. This makes it look blurry rather than crisp.

To Reproduce
Open the app and look at the text. Bold text emphasizes the problem. If it's still hard to spot take a screenshot and zoom into it.

Expected behavior
Text should not look blurry.

Screenshots
If you really need it I can grab a screenshot of the application, but this example plucked from the Electron FAQ in Additional context illustrates the problem.
Subpixel rendering example

Desktop (please complete the following information):

  • OS: Windows 10.0.19044.2251
  • Version: 0.5.13

Additional context
Changing theme or font does not fix the problem, although it's less visible with "Default Dark" than for example "Spotify-like", maybe due to less contrast.

The Electron FAQ addresses this problem and proposes a fix.

Sub-pixel anti-aliasing needs a non-transparent background of the layer containing the font glyphs. (See electron/electron#6344 (comment) for more info).

To achieve this goal, set the background in the constructor for BrowserWindow:

const { BrowserWindow } = require('electron')
const win = new BrowserWindow({
  backgroundColor: '#fff'
})

Notice that just setting the background in the CSS does not have the desired effect.

@aqt aqt added the bug Something isn't working label Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant