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

Enable RGB font aliasing #1755

Closed
mad-wnn opened this issue Sep 2, 2020 · 2 comments
Closed

Enable RGB font aliasing #1755

mad-wnn opened this issue Sep 2, 2020 · 2 comments

Comments

@mad-wnn
Copy link

mad-wnn commented Sep 2, 2020

Hello,
I'm on Linux, running Birdwhale 4.2.1 and 4.2.2

I've noticed perceptual font render quality is lower than in my other apps, specificaly subpixel rendering is enforced to grayscale regardless my system settings that state RGB subpixel rendering should be used. That results in blurriness of a font.

Did a quick look up: per https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do an entry backgroundColor: '#fff' has been recommended to be passed to window constructor for blurriness to eventualy disappear.
Per above reference I did that change and that improved font rendering situation for my platform:

(result on the left, old behaviour on the right)
Whalebird

Could that change be incorporated into codebase?

@h3poteto
Copy link
Owner

Did you just add the code below? Does that alone improve it?

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

@h3poteto h3poteto added the ToDo label Sep 13, 2020
@mad-wnn
Copy link
Author

mad-wnn commented Sep 13, 2020

Yes, inserted the backgroundColor: '#fff' line into

const mainOpts: BrowserWindowConstructorOptions = {
titleBarStyle: 'hidden',
x: mainWindowState.x,
y: mainWindowState.y,

.. for the resulting:

  const mainOpts: BrowserWindowConstructorOptions = {
    backgroundColor: '#fff',
    titleBarStyle: 'hidden',
    x: mainWindowState.x,
    y: mainWindowState.y,
(...)

... did the job.
Sorry for lack of PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants