1.0.3 • Published 9 years ago

fontformat v1.0.3

Weekly downloads
-
License
BSD
Repository
-
Last release
9 years ago

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.