Font
Every device and browser combination can have slight differences in the list and versions of fonts installed. Font browser fingerprinting capitalizes on this to generate a unique or semi-unique profile of a visitor based on the fonts detected on their device. This information can then be used for targeted advertising, user profiling, or even evading privacy measures.
Implementing Font Browser Fingerprinting in JavaScript
Here’s a simplified implementation to detect available fonts:
This code works by drawing text to a canvas element and measuring its width. If the width changes when a specific font is applied, it’s likely that the font exists on the user’s system.
Bypassing Font Browser Fingerprinting
By default, a given combination of operating system / browser will produce the same results on two different devices. Font fingerprinting is not an issue on low-scale scraping done on consumer hardware. However it can be on high-scale web scraping projects. In this case, spoofing is best way to bypass it, has most anti-bot solutions won’t verify this data with CSS or Canvas Fingerprinting.