4 ms·
I don't think that's even theoretically possible. How do you block JS font enumeration without crippling the browser font API?
by pmiller2 9y ago
I don't think that's even theoretically possible. How do you block JS font enumeration without crippling the browser font API?
- ceejayoz 9y agoBrowsers already treat first-party cookies differently than third-party ones. Report a homogenized fingerprint to Google Analytics, but a real one to the main site.
- tinus_hn 9y agoOffer the same basic set to every site. Why does a website need to know the fonts you've installed?
- gsnedders 9y agoYou can't block font enumeration without crippling the entire CSSOM. But that doesn't affect iOS, because you can't install fonts on iOS.
- dsp1234 9y agoyou can't install fonts on iOS. Custom fonts can be installed via custom configuration profiles[0], which is what some font applications do[1] I'm not sure if this is exposed via Safari or not, so it could still be a moot point. [0] - https://developer.apple.com/library/content/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010206-CH1-SW43 https://developer.apple.com/library/content/featuredarticles... [1] - https://itunes.apple.com/us/app/anyfont/id821560738 https://itunes.apple.com/us/app/anyfont/id821560738
- derefr 9y agoSimple way would be tainting any JS/DOM data that interacts with the font metrics API (or one of a number of other similar APIs) and then not allowing tainted data to be used as parameters in network requests.
- gsnedders 9y agoYou don't even need the font metrics API. Draw a span containing the character "m", measure the width of the span using Element.clientWidth. Unless you taint (almost literally) the entire CSSOM, you can pull off similar things.
- derefr 9y agoIs there a reason to not taint the entire CSSOM? Alternately: why not anonymize CSSOM return values? Your browser might have access to OS fonts A+B+C, but if your JS asked the CSSOM about the size of characters on the page, the answer it would give would come from an "alternate world" where the browser only has access to the web-safe fonts, and so is using one of them.
- Arnavion 9y agoPixel-correct measurement of fonts / text is a must-have for certain specific applications like subtitle renderers. (I maintain one.) For a specific example, it's more pleasing to split a long line of text in a way that all the split lines have roughly the same length - "a a a b b b" -> "a a a\nb b b". But CSS only gives you one way to split lines - as much text as possible in all but the last line and whatever's leftover in the last line - "a a a b b\nb". This means a renderer library has to be able to measure the width of text to be able to insert linebreaks itself.
- gsnedders 9y agoHuge amounts of the web will break: anything doing anything layout-related with JS will likely break. Changing line-lengths will cause odd bits of layout breakage, so just giving bogus results as if rendered with a different set of fonts won't work properly either.
- dangayle 9y agoIsn't this one of the stated features of the Tor browser?
- om2 9y agoOne way would be to not expose any installed fonts to web content other than the system default ones.