WorkerGlobalScope: fonts-Eigenschaft
        
        
          
                Baseline
                
                  Widely available
                
                
              
        
        
        
          
                
              
                
              
                
              
        
        
      
      This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.
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
Loading…
Siehe auch
FontFaceSet-SchnittstelleFontFace