草案
此页面不完整。

这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

load() 方法在 FontFace interface loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a Promise that resolves with the current FontFace object.

句法

var promise = FontFace.load();
					

参数

None.

返回值

A Promise that resolves with a reference to the current FontFace object when the font loads or rejects with a NetworkError if the loading process fails.

异常

NetworkError

Indicates that the attempt to load the font failed.

规范

规范 状态 注释
CSS Font Loading Module Level 3
在该规范中的 load 定义。
工作草案 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
load Chrome 45
45
不支持 35 — 45
Before Chrome 45, the returned promise resolved with void instead of a FontFace object as required by the specification.
Edge 79 Firefox Yes IE ? Opera Yes Safari 10 WebView Android 45
45
不支持 37 — 45
Before WebView 45, the returned promise resolved with void instead of a FontFace object as required by the specification.
Chrome Android 45
45
不支持 35 — 45
Before Chrome 45, the returned promise resolved with void instead of a FontFace object as required by the specification.
Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android 5.0
5.0
不支持 4.0 — 5.0
Before Samsung Internet 5.0, the returned promise resolved with void instead of a FontFace object as required by the specification.

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

见实现注意事项。

元数据

  • 最后修改:
  1. CSS 字体加载 API
  2. FontFace
  3. 构造函数
    1. FontFace()
  4. 特性
    1. display
    2. 系列
    3. featureSettings
    4. loaded
    5. status
    6. stretch
    7. style
    8. unicodeRange
    9. variant
    10. weight
  5. 方法
    1. load
  6. Related pages for CSS Font Loading API
    1. FontFaceSet
    2. FontFaceSetLoadEvent
    3. FontFaceSource

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1