Capítulo 167 de 859
A loader for loading fonts.
You can convert fonts online using facetype.js.
const loader = new FontLoader();
const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' );
Constructor
| Signature |
|---|
new FontLoader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) | Starts loading from the given URL and passes the loaded font to the onLoad() callback. |
.parse( json : Object ) : Font | Parses the given font data and returns the resulting font. |