fontformatdetection:使用特征检测检测浏览器对字体格式的支持

时间:2021-06-07 18:18:59
【文件属性】:
文件名称:fontformatdetection:使用特征检测检测浏览器对字体格式的支持
文件大小:39KB
文件格式:ZIP
更新时间:2021-06-07 18:18:59
JavaScript 字体格式特征检测 该库无需借助用户代理嗅探即可检测对 @font-face 字体格式的支持。 为了有效地做到这一点,它做出以下假设: 所有浏览器都支持 OpenType 字体(IE6-8 除外)。 所有支持 WOFF2 的浏览器都支持 WOFF。 所有支持 WOFF 的浏览器都支持 OpenType。 用法 var fontformat = new FontFormat(); fontformat.detect().then(function (formats) { // formats = ['opentype', 'woff', 'woff2'] }); 执照 FontFormat 是在 BSD 许可下获得许可的。 版权所有 2015 布拉姆斯坦。 版权所有。
【文件预览】:
fontformatdetection-master
----vendor()
--------unexpected.js(78KB)
--------base.js(47KB)
----fontformat.standalone.js(7KB)
----package.json(529B)
----Gruntfile.js(2KB)
----src()
--------fontformat.js(4KB)
--------main.js(148B)
----fontformat.js(3KB)
----README.md(609B)

网友评论