Font Fingerprinting: The Invisible Browser Tracker That Reveals Your System
Browser fingerprinting goes deeper than most developers realize. While Canvas and WebGL fingerprints get attention, font fingerprinting is one of the most stable and reliable tracking signals — and...

Source: DEV Community
Browser fingerprinting goes deeper than most developers realize. While Canvas and WebGL fingerprints get attention, font fingerprinting is one of the most stable and reliable tracking signals — and almost nobody talks about it. How Font Fingerprinting Works Every operating system comes with a different set of pre-installed fonts. Windows has different defaults than macOS, which differs from Ubuntu. And even within the same OS, installed applications add more fonts. When you visit a website, JavaScript can probe which fonts are available on your system using several methods: Method 1: CSS Font Probing function detectFont(fontName) { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); // Measure text width with a fallback font ctx.font = '72px monospace'; const baseWidth = ctx.measureText('mmmmmmmmm').width; // Measure with the target font ctx.font = `72px ${fontName}, monospace`; const testWidth = ctx.measureText('mmmmmmmmm').width; // If widths differ,