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

Prefer Linux-specific fonts over Arial #34547

Merged
merged 1 commit into from
Feb 26, 2022
Merged

Prefer Linux-specific fonts over Arial #34547

merged 1 commit into from
Feb 26, 2022

Conversation

kusma
Copy link
Contributor

@kusma kusma commented Jul 21, 2021

Some Linux distributions (like Debian) have fontconfig aliases for Arial
that picks specific fonts. But such generic aliases might be less
desirable than the known-good Linux specific fonts.

This fixes a problem on my setup where Liberation Sans is aliased as
Arial, even when Noto Sans is available. Liberation Sans doesn't support
a weight of 500, so we end up rendering headers at the normal weight of
400, which makes them stand out less. Reordering the Arial fallback
makes us instead pick Noto Sans over Lieration Sans, which does support
a weight of 500, and makes headers stand out again.

While we're at it, fixup the reboot documentation to match, and change
the comment about Helvetica Neue; that's not a "Basic web-fallback" font,
it's the UI font on older iOS and macOS versions.

@kusma kusma requested a review from a team as a code owner July 21, 2021 07:59
@ffoodd
Copy link
Member

ffoodd commented Aug 20, 2021

Thanks for opening this!

If we go this way, wouldn't it be better to drop Liberation Sans entirely, since it's found behind Arial in most distros (at least Ubuntu and Fedora? Setting Arial after Liberation Sans feels useless. On Ubuntu 20.04, I don't have Noto Sans installed but have Arial (using the microsoft-ttf-installer) so it's even weird because it forces Liberation where I could use Arial.

Same concern regarding Roboto, since it's an alias for Arial too. Not quite sure about side-effects on Android though, since if Noto Sans is available on Android it'd pick that instead of falling back to Roboto as an Arial alias.

@kusma
Copy link
Contributor Author

kusma commented Aug 23, 2021

I'm not really familiar enough with the specifics of Arial-proper and the various fallbacks that various distros provide depending on what set of installed packages to feel confident to suggest much change beyond what I'm suggesting here, I think. That doesn't mean that I would oppose going further, but I don't think that would be a change I would want to put my name on, simply because I don't feel like I've done enough research on the matter.

@ffoodd
Copy link
Member

ffoodd commented Aug 23, 2021

Fair enough 👌

IMHO this is good. Just remembered that on Ubuntu at least, dropping Liberation would make Chromium and Firefox choose a different fallback to Arial, which is what we tried to prevent.
I just need to test this before accepting.

@kusma
Copy link
Contributor Author

kusma commented Feb 21, 2022

@ffoodd: Anything I can do to help moving this forward?

Copy link
Member

@ffoodd ffoodd left a comment

Choose a reason for hiding this comment

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

LGTM, just tried a few variants on Ubuntu and this feels safe. Using Arial as a generic fallback looks like a good idea, IMHO. Thanks!

@kusma
Copy link
Contributor Author

kusma commented Feb 24, 2022

@ffoodd: As a first-time contributor, I need someone to approve running the workflows. Would you mind doing that? :)

Some Linux distributions (like Debian) have fontconfig aliases for Arial
that picks specific fonts. But such generic aliases might be less
desirable than the known-good Linux specific fonts.

This fixes a problem on my setup where Liberation Sans is aliased as
Arial, even when Noto Sans is available. Liberation Sans doesn't support
a weight of 500, so we end up rendering headers at the normal weight of
400, which makes them stand out less. Reordering the Arial fallback
makes us instead pick Noto Sans over Lieration Sans, which does support
a weight of 500, and makes headers stand out again.

While we're at it, fixup the reboot documentation to match, and change
the comment about Helvetica Neue; that's not a "Basic web-fallback" font,
it's the UI font on older iOS and macOS versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants