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

[css-fonts-5] Allow tweaking font-stretch at per-fallback granularity #5977

Open
litherum opened this issue Feb 10, 2021 · 0 comments
Open

Comments

@litherum
Copy link
Contributor

This issue is split off from #126

There are 2 use cases:

  • Being able to tweak the look of fallback fonts while web fonts are loading. The goal is to reduce the effects of the visual reflow when the web font does finally load (aka "flashiness")
  • Being able to tweak the look of fallback fonts for characters which are unsupported by the primary font. (I'm sure we've all seen cases where a rogue "é" somewhere on the page is rendered in some horrific and particularly noticeable fallback.)

The goal is to allow pages the ability to say something like "for this fallback font, use font width X, but for this other fallback font, use font width Y."

In #126 (comment) we resolved to do this sort of thing via @font-face descriptors.

Note that, this sort of tweaking can already be done for non-variable fonts today: authors can just mark their @font-face block as having a different font-stretch from the width the font file reports to have. However, this doesn't work for variable fonts. So, there's more to do here, but this additional work isn't super high priority (since most of the use case is already satisfied).

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

1 participant