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 subpixel hinting doesn't work in Linux #721

Closed
3v1n0 opened this issue Dec 16, 2015 · 15 comments
Closed

Text subpixel hinting doesn't work in Linux #721

3v1n0 opened this issue Dec 16, 2015 · 15 comments

Comments

@3v1n0
Copy link

3v1n0 commented Dec 16, 2015

I'm running N1 in Ubuntu, but the font subpixel hinting is missing (or not following the system settings), making it not so nice to read in LCD screens.

@mbilker
Copy link
Contributor

mbilker commented Dec 16, 2015

Does sub-pixel hinting work in Chrome or Chromium? How did you set sub-pixel hinting on Ubuntu? I have mine set in i3 through lxappearance.

2015-12-16-15-50-57_1279x799

@3v1n0
Copy link
Author

3v1n0 commented Dec 17, 2015

Yes, both Chrome and Chromium have proper hinting here.

Settings are managed by gnome-settings-daemon, there's not an UI to control this, but you can change these settings from gsettings

The keys are
org.gnome.settings-daemon.plugins.xsettings antialias
org.gnome.settings-daemon.plugins.xsettings hinting

These changes are then reflected on X root window resource manager:

xprop -root RESOURCE_MANAGER
RESOURCE_MANAGER(STRING) = "*customization:\t-color\nXft.antialias:\t1\nXft.dpi:\t96\nXft.hinting:\t1\nXft.hintstyle:\thintslight\nXft.rgba:\trgb\n"

@mbilker
Copy link
Contributor

mbilker commented Dec 17, 2015

Ok. I use Arch Linux WITHOUT gnome-settings-daemon under i3. The X root window resource manager reports:

RESOURCE_MANAGER(STRING) = "Xft.antialias:\t1\nXft.autohint:\t0\nXft.dpi:\t96\nXft.hinting:\t1\nXft.hintstyle:\thintfull\nXft.lcdfilter:\tlcddefault\nXft.rgba:\trgb\n"

Here is my N1 window:
2015-12-17-11-41-34_1279x799

Do you know if it is subpixel hinting is present in my window? My hinting style is set to full and my screen is a MacBook Pro non-Retina Late 2011. The screen resolution is 1280x800.

@3v1n0
Copy link
Author

3v1n0 commented Dec 17, 2015

No, it's tno not there... Try to open the the same message in a browser, and you'll see the difference (or zoom a screenshot of them). It's only using grayscale antialiasing, not actual hinting.

@bengotow
Copy link
Contributor

Hey folks! Hmm—interesting... for others stumbling across this, here's an illustration of subpixel hinting:
epmpj

I think this might be an issue to take up with Electron (https://github.com/atom/electron) the framework we use which wraps Chromium. We're currently shipping with Chromium 45 maybe it's been added more recently?

@bengotow bengotow added the linux label Dec 17, 2015
@mbilker
Copy link
Contributor

mbilker commented Dec 17, 2015

Ok. I will investigate. I use the infinality's freetype2 patches.

@mbilker
Copy link
Contributor

mbilker commented Dec 18, 2015

Found it in Chrome! In chrome://flags, there is an option to enable subpixel text antialiasing. Since it is in development, it would be disabled or not even included in Electron.

2015-12-17-19-13-38_642x60

@mbilker
Copy link
Contributor

mbilker commented Dec 18, 2015

Unfortunately, Chrome/Chromium experiments are only implemented in the browser, not in libchromiumcontent that Electron uses.

@3v1n0
Copy link
Author

3v1n0 commented Feb 9, 2016

I think this might be an issue to take up with Electron (https://github.com/atom/electron) the framework we use which wraps Chromium. We're currently shipping with Chromium 45 maybe it's been added more recently?

@bengotow (@jstejada) text is properly rendered in Atom (1.4.3), so not sure whether this is the case.
However I remember that old versions (like very first betas) of Atom had this issue.

See properly rendered in Atom

@mbilker
Copy link
Contributor

mbilker commented Feb 9, 2016

@3v1n0 I see that image contains subpixel antialiasing. I do not know if the infinality patch set includes support for subpixel antialiasing. I know it draws text sharper for my Late 2011 MBP running Arch Linux. I cannot read text without it.

@3v1n0
Copy link
Author

3v1n0 commented Feb 10, 2016

Subpixel hinting is supported by cairo and fontconfig for long time, so it's not a system problem.

For some some reason this app is not using system settings when rendering.

@mbilker
Copy link
Contributor

mbilker commented Feb 11, 2016

@3v1n0 From Atom's atom/atom#3349, atom/atom#1650, and atom/atom#6733, there should be -webkit-font-smoothing: subpixel-antialiased; set on elements to have the text rendered with subpixel AA. Atom uses a bag of tricks to get it working correctly, but N1's DOM structure is a little more hectic and could use some improvement.

Some component in the DOM tree causes the subpixel antialiasing to not occur.

In addition, subpixel AA is only enabled on certain elements because of this. The subpixel-antialiased setting is enabled for .welcome-page p.hero-text and .thread-list .list-container, .thread-list .scroll-region, .draft-list .list-container, .draft-list .scroll-region elements.

I know there is a group of people who cannot work without subpixel AA. I do not have a good way to test if subpixel AA is working in N1 without a good method to test under Linux.

@mbilker mbilker reopened this Feb 11, 2016
@3v1n0
Copy link
Author

3v1n0 commented Feb 11, 2016

The subpixel-antialiased setting is enabled for .welcome-page p.hero-text

Mh, I had like the impression that the splash screen was showing the text correctly aliased, and in fact, from a proper check it's the case:
schermata del 2016-02-11 04 07 32

I know there is a group of people who cannot work without subpixel AA

Unfortunately I'm one of these.. :-(

I do not have a good way to test if subpixel AA is working in N1 without a good method to test under Linux.

I don't think there's a way to automate this test (yet) other than using a magnifier to check that.

@jackiehluo
Copy link
Contributor

jackiehluo commented Sep 30, 2016

Closing due to inactivity—let us know if it's still an issue!

@3v1n0
Copy link
Author

3v1n0 commented Oct 1, 2016

Sure it's still a problem.

Il 01 ott 2016 1:30 AM, "Jackie Luo" notifications@github.com ha scritto:

Closed #721 #721.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#721 (comment), or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAVGSwcWzm4knH_lIaEcxdZZ8fNS0baRks5qvZt7gaJpZM4G2mXz
.

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

5 participants