Skip to content

Conversation

@jtnord
Copy link
Member

@jtnord jtnord commented Nov 10, 2023

specifying the anti-aliasing implies we know better than the browser (we don't). Specifiying this globally prevents the use of sub-pixel anti-aliasing where it is available and the browsers text rendering engines are these days pretty much fantastic that they should not need these hacks.

and for good measure - here is an article from 10 years ago https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/ and the mozilla doc saying do not use it on a public facing web site. https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth

See JENKINS-XXXXX.

Testing done

Proposed changelog entries

  • Tweak font styling to remove anti-aliasing

Proposed upgrade guidelines

N/A

### Submitter checklist
- [ ] The Jira issue, if it exists, is well-described.
- [ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see [examples](https://github.com/jenkins-infra/jenkins.io/blob/master/content/_data/changelogs/weekly.yml)). Fill in the **Proposed upgrade guidelines** section only if there are breaking changes or changes that may require extra steps from users during upgrade.
- [ ] There is automated testing or an explanation as to why this change has no tests.
- [ ] New public classes, fields, and methods are annotated with `@Restricted` or have `@since TODO` Javadocs, as appropriate.
- [ ] New deprecations are annotated with `@Deprecated(since = "TODO")` or `@Deprecated(forRemoval = true, since = "TODO")`, if applicable.
- [ ] New or substantially changed JavaScript is not defined inline and does not call `eval` to ease future introduction of Content Security Policy (CSP) directives (see [documentation](https://www.jenkins.io/doc/developer/security/csp/)).
- [ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.
- [ ] For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

### Maintainer checklist
- [ ] There are at least two (2) approvals for the pull request and no outstanding requests for change.
- [ ] Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
- [ ] Changelog entries in the pull request title and/or **Proposed changelog entries** are accurate, human-readable, and in the imperative mood.
- [ ] Proper changelog labels are set so that the changelog can be generated automatically.
- [ ] If the change needs additional upgrade steps from users, the `upgrade-guide-needed` label is set and there is a **Proposed upgrade guidelines** section in the pull request title (see [example](https://github.com/jenkinsci/jenkins/pull/4387)).
- [ ] If it would make sense to backport the change to LTS, a Jira issue must exist, be a _Bug_ or _Improvement_, and be labeled as `lts-candidate` to be considered (see [query](https://issues.jenkins.io/issues/?filter=12146)).

specifying the anti-aliasing implies we know better than the browser (we
don't).  Specifiying this globally prevents the use of sub-pixel anti-aliasing
where it is available and the browsers text rendering engines are these
days pretty much fantastic that they should not need these hacks.

and for good measure - here is an article from 10 years ago
https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
and the mozilla doc saying do not use it on a public facing web site.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth
@janfaracik
Copy link
Member

I was thinking of making this change myself - LGTM.

@jtnord jtnord marked this pull request as ready for review November 30, 2023 13:40
@jtnord
Copy link
Member Author

jtnord commented Nov 30, 2023

would someone be able to check this on OS-X I only have access to linux and windows?

@jtnord jtnord requested review from a team November 30, 2023 13:42
@timja timja added rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise labels Nov 30, 2023
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks as intended on macOS.

@NotMyFault NotMyFault requested a review from a team December 4, 2023 08:29
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 4, 2023
@NotMyFault NotMyFault merged commit 62d22f3 into jenkinsci:master Dec 5, 2023
@Pesa
Copy link

Pesa commented Dec 5, 2023

Looks as intended on macOS.

Just upgraded to 2.435 and text (especially bold text) looks noticeably worse for me on macOS with Chrome 120. This is with the dark-theme-plugin.

The article referenced by this commit specifically mentions light text on dark background as a special case where antialiasing may be beneficial:

Subpixel rendering gives us optimal font clarity for your typical dark text on light background. However, on Mac OS X, when this is reversed and you set light text on a dark background, you get a fairly ugly effect where the text becomes overly bold, spilling out of its lines. Switching away from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter, countering the bolding effect.
[...]
Antialiasing is useful for certain circumstances, such as for light on dark text
[...]
Feel free to use it on light text on dark backgrounds

Note that even vanilla jenkins uses light text on dark background in some places (for the user name and "log out" in the site header).

@basil
Copy link
Member

basil commented Dec 6, 2023

@Pesa For what it's worth, I'm extremely fussy about typography, I run Firefox on Ubuntu with a highly customized font setup (including custom fonts, anti-aliasing, RGB sub-pixel rendering, and hinting), and I use the Dark Theme, and I can't notice any issues. That isn't to deny that your problem is legitimate, but I don't see any clear evidence yet that this is a regression. If you feel strongly about this, can you please file a Jira ticket with screenshots of the old and new appearance and an explanation about why you feel the new appearance is worse? Also, don't high-traffic web sites like GitHub use the same settings as those in this PR, without user complaints?

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

Labels

ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants