Back to articles
Font Fingerprinting: The Invisible Browser Tracker That Reveals Your System

Font Fingerprinting: The Invisible Browser Tracker That Reveals Your System

via Dev.to WebdevFireKey Team

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 (

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles