5 ms·
Which API reveals my system fonts to a website? Edit: The fingerprint test at https://panopticlick.eff.org/ https://panopticlick.eff.org/ shows my System Fonts
by jordache 10y ago
Which API reveals my system fonts to a website?
Edit: The fingerprint test at https://panopticlick.eff.org/ https://panopticlick.eff.org/ shows my System Fonts
- mpeg 10y agoYou can't get installed fonts via javascript, but you can change the font of a known text and fingerprint the size to determine whether the font is installed or it defaulted to another font.
- tangent128 10y agoI don't think you can enumerate them these days, but you can test for them by trying to use them in CSS (which font is used would affect the width of a span of text, use a wildly different fallback font and you can guess which is installed) or <canvas> (where you can inspect the actual pixels rendered).
- Freak_NL 10y agoOr use @font-face and detect calls to a remote URL — which happens when the named local font is missing: @font-face { font-family: "Roboto"; src: local("Roboto"), url("https://example.com/user-does-not-have-roboto") format("woff2"); }
- dao- 10y agoFlash provides an API for that. Edit: Disable Flash or make it click-to-activate and https://panopticlick.eff.org/ https://panopticlick.eff.org/ shouldn't list your fonts anymore.