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-conditional-4] Specific font families? #2139

Closed
ShaneHudson opened this issue Dec 27, 2017 · 5 comments
Closed

[css-conditional-4] Specific font families? #2139

ShaneHudson opened this issue Dec 27, 2017 · 5 comments
Labels
Closed Rejected as Wontfix by Editor Discretion css-conditional-4 privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.

Comments

@ShaneHudson
Copy link

ShaneHudson commented Dec 27, 2017

Would it be feasible to add the ability to use @supports for checking if particular font-families available?

For instance something like:

@supports (font-family: georgia) {
    body {
        font-size: 1.1em;
    }
}

The main use-case for this would be improving (and indeed testing, by misspelling) typography for fallbacks. This is especially useful for fonts that have very different sizes by default, in which changing the font could make the layout look odd. This could also be useful if the fallback font is showing while a webfont is being loaded.

@upsuper
Copy link
Member

upsuper commented Dec 27, 2017

  1. You cannot reuse font-family: georgia like that, because that syntax has been defined as doing only parsing. You may need function syntax, e.g. font-family(georgia) or something like that, which is currently reserved for future extension.
  2. I don't think we can add this, because it would become an easy fingerprinting vector. I'm not sure whether it is any worse than current situation, e.g. via <canvas>, though.

For the use-case that fonts may have different sizes, you can probably try font-size-adjust property which was designed to address this issue.

@Nadya678
Copy link

Yes, it is big impact for privacy of users. Please do not add it.
But:
still there may be in hidden <div/> set "font-family:georgia, self-defined font" and with JavaScript readed height of content/element and thus impact for privacy for fingerprint the browser. but... only with enabled JS. It means: also selectors like @element div and (max-height:40px) shall be forbidden if will be proposed.

@fantasai fantasai changed the title [css-conditional-3] Specific font families? [css-conditional-4] Specific font families? Jan 11, 2018
@svgeesus
Copy link
Contributor

svgeesus commented Dec 3, 2021

This is related to #4497

See also the Privacy section in CSS Fonts 4:

An attacker may obtain fingerprinting information by querying the Installed Fonts. In contrast to older technologies (notably Adobe Flash, which provided a complete list of Installed Fonts and sent this information in HTTP headers) such probing must be done one font at a time, providing the font family name and then checking (either via script, or by using unicode-range to selectively download webfonts depending on whether the user has a font by a certain name that supports a certain character) whether the font was loaded. This takes time, and checking for more than a few hundred fonts introduces a noticeable delay in page rendering.

@svgeesus
Copy link
Contributor

svgeesus commented Dec 3, 2021

Closing because adding a fast, Flash-like way to test for thousands of installed fonts as a fingerprinting vector is the last thing we want to do.

@svgeesus svgeesus closed this as completed Dec 3, 2021
@svgeesus svgeesus added the privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response. label Dec 3, 2021
@svgeesus
Copy link
Contributor

svgeesus commented Dec 3, 2021

(Adding privacy tracker just so PING know we won't be doing this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Rejected as Wontfix by Editor Discretion css-conditional-4 privacy-tracker Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.
Projects
None yet
Development

No branches or pull requests

5 participants