available-fonts
v1.0.0
Published
getting available fonts on browser without flash
Downloads
1
Maintainers
Readme
Available Fonts
Getting available fonts on browser without flash
see Demo Page
This methods based on http://www.lalit.org/lab/javascript-css-font-detect/
Usage
simple
var testFonts = ['font family...'];
var availableFontsList = availableFonts(testFonts);
if you use our test fonts list, try below code.
(function() {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var testFonts = JSON.parse(xhr.responseText).testfonts;
var availableFontsList = availableFonts(testFonts);
document.body.appendChild(document.createTextNode(availableFontsList.join(', ')));
}
};
xhr.open('GET', 'testfonts.json');
xhr.send();
}())
Feature Works
- Optimize test fonts list for Browser Fingerprinting
License
This project is licensed under the MIT License - see the LICENSE file for details