Skip to content

[css-fonts-5] Allow tweaking font-size at per-fallback granularity #5976

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

Closed
litherum opened this issue Feb 10, 2021 · 7 comments
Closed

[css-fonts-5] Allow tweaking font-size at per-fallback granularity #5976

litherum opened this issue Feb 10, 2021 · 7 comments

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 size X, but for this other fallback font, use font size Y."

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

Note that something similar (though less flexible) can be done already with font-size-adjust. So this bug isn't very high priority, as that will probably work for many of these situations.

@svgeesus
Copy link
Contributor

Note that something similar (though less flexible) can be done already with font-size-adjust.

For text a) whose characters use the Latin (or possibly Cyrillic or Greek) scripts, and b) thus the glyphs have a meaningful x-height, and c) where the difference between the fallback and the web font is a significant difference in x-height, then yes.

Otherwise, (i.e. for most of Unicode) font-size-adjust offers no benefit.

@svgeesus
Copy link
Contributor

svgeesus commented Feb 11, 2021

@litherum @r12a

There are 2 use cases:

There are 3 use cases, the third being

  • Being able to tweak the look of fallback fonts where different fonts in the font stack have very different visual sizes, for the script being rendered.

@litherum
Copy link
Contributor Author

@litherum @r12a

There are 2 use cases:

There are 3 use cases, the third being

  • Being able to tweak the look of fallback fonts where different fonts in the font stack have very different visual sizes, for the script being rendered.

I think that's the same as the second case. Maybe I was unclear in my description?

@r12a
Copy link
Contributor

r12a commented Feb 12, 2021

To my mind it's a different use case – one that is not to do with ransom noting, ie. displaying the text on a single platform where the chosen font lacks glyphs, but rather substituting (fully complete) fonts for each other on different platforms. As a use case that's different.

However, #126 (comment) describes another use case that is quite close to your point 2, where a font doesn't contain Latin glyphs needed for acronyms, names, or quoted text, etc.

@litherum
Copy link
Contributor Author

litherum commented Feb 12, 2021

but rather substituting (fully complete) fonts for each other on different platforms. As a use case that's different.

Okay, that makes sense. Got it.

@svgeesus
Copy link
Contributor

I think that's the same as the second case. Maybe I was unclear in my description?

Not at all. (Except if one argues that a font which doesn't exist has support for zero characters. But even then, calling the non-existent font primary seems odd).

@litherum
Copy link
Contributor Author

This topic is a dup of #6075

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

3 participants