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

How to turn on the sub-pixel anti-aliasing? #790

Closed
wdhwg001 opened this issue Jul 25, 2017 · 8 comments
Closed

How to turn on the sub-pixel anti-aliasing? #790

wdhwg001 opened this issue Jul 25, 2017 · 8 comments

Comments

@wdhwg001
Copy link

wdhwg001 commented Jul 25, 2017

snipaste_20170725_184159

OS: Windows 10 Creator Update 64 bit
Version: latest (0.9.29 beta)
Theme: GitHub
No MacType or similar software installed.
Windows ClearType is enabled.

Changing directWrite from true to false doesn't help.

Adding -webkit-font-smoothing: subpixel-antialiased !important; to CSS body{} doesn't help.

Any ideas?

@abnerlee
Copy link
Contributor

-webkit-font-smoothing: subpixel-antialiased !important;

I think this is the way to set subpixel-antialiased.
But please not that -webkit-font-smoothing is not standard, and subpixel-antialiased is already the default font smoothing mode that is used.

@wdhwg001
Copy link
Author

wdhwg001 commented Jul 26, 2017

@abnerlee But it doesn't work. The screenshot is made after I added -webkit-font-smoothing CSS property to the stylesheet and restarted Typora.

FYI, please look closely to the screenshot above, scale to 400% with Photoshop or other software.
You may find some red and blue edges around the title, it's ClearType.
But the content is only rendered in grayscale, it may look fine on Retina display with sans-serif fonts, but could be really blurry on non-retina display with serif fonts.

snipaste_20170726_211608

Maybe refer to electron/electron#6344

If you can reproduce this issue, could you please re-open it before it being actually fixed?

@abnerlee abnerlee reopened this Jul 26, 2017
@abnerlee
Copy link
Contributor

@wdhwg001 If you export the content to HTML, open it with Chrome, and then set -webkit-font-smoothing in DevTools, could it work?

@wdhwg001
Copy link
Author

Sorry for the misunderstanding.

It works with and without -webkit-font-smoothing.

snipaste_20170726_223306

And the Typora built-in DevTool and the footer is grayscaled, maybe some issues in Electon's version or configurations?

snipaste_20170726_214115

@wdhwg001
Copy link
Author

Any updates?

This issue is still in the latest Typora (0.9.31).

@wdhwg001
Copy link
Author

Text is still grayscale anti-aliased in Typora 0.9.32.

@wdhwg001
Copy link
Author

Still not fixed in Typora 0.9.35

@abnerlee
Copy link
Contributor

Does this work in v0.9.41?

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

No branches or pull requests

2 participants