An open API service indexing awesome lists of open source software.

https://github.com/bramstein/fontformatdetection

Detect browser support for font formats using feature detection
https://github.com/bramstein/fontformatdetection

Last synced: about 1 year ago
JSON representation

Detect browser support for font formats using feature detection

Awesome Lists containing this project

README

          

# Font Format Feature Detection

This library detects support for @font-face font formats without resorting to user agent sniffing. To do this efficiently, it makes the following assumptions:

* All browsers support OpenType fonts (except IE6-8).
* All browsers that support WOFF2 support WOFF.
* All browsers that support WOFF support OpenType.

# Usage

var fontformat = new FontFormat();

fontformat.detect().then(function (formats) {
// formats = ['opentype', 'woff', 'woff2']
});

# License

FontFormat is licensed under the BSD License. Copyright 2015 Bram Stein. All rights reserved.