这篇翻译不完整。请帮忙从英语翻译这篇文章

Document的 fonts 属性接口返回文档的 FontFaceSet 接口。

语法

let fontFaceSet = document.fonts;

返回值是文档的 FontFaceSet 接口。FontFaceSet 接口对 加载新字体、检查已加载字体的加载状态 来说非常有用。

例子

在所有字体加载完成后进行操作

document.fonts.ready.then(function() {
  // 字体加载完成后的逻辑
});

说明

Specification Status Comment
CSS Font Loading Module Level 3
FontFaceSet
Working Draft Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 60Edge No support NoFirefox Full support 41
Full support 41
No support 35 — 41
Disabled
Disabled From version 35 until version 41 (exclusive): this feature is behind the layout.css.font-loading-api.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 47Safari Full support 10WebView Android Full support 60Chrome Android Full support 60Edge Mobile No support NoFirefox Android Full support YesOpera Android Full support 47Safari iOS Full support 10.2Samsung Internet Android Full support 5.0

Legend

Full support  
Full support
No support  
No support
User must explicitly enable this feature.
User must explicitly enable this feature.

参考资料

文档标签和贡献者

此页面的贡献者: mimiton
最后编辑者: mimiton,