WorkerGlobalScope: fonts-Eigenschaft
Hinweis: Diese Funktion ist nur in Web Workers verfügbar.
Die fonts
-Eigenschaft der WorkerGlobalScope
-Schnittstelle gibt die FontFaceSet
-Schnittstelle des Workers zurück.
Diese Eigenschaft ist Teil der CSS-Schriftartenlade-API.
Wert
Der zurückgegebene Wert ist die FontFaceSet
-Schnittstelle des Workers.
Die FontFaceSet
-Schnittstelle ist nützlich zum Laden neuer Schriftarten, Überprüfen des Status zuvor geladener Schriftarten usw.
Beispiele
Operationen ausführen, nachdem alle Schriftarten geladen sind
js
fonts.ready.then(() => {
// Any operation that needs to be done only after all the fonts
// have finished loading can go here.
});
Spezifikationen
Specification |
---|
CSS Font Loading Module Level 3 # dom-fontfacesource-fonts |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
fonts |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on 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.
Siehe auch
FontFaceSet
-SchnittstelleFontFace