a lightweight font loader
With npm installed, run
npm install @agilo/font-loader
Load font via CSS @font-face or any other available method then:
import fontLoader from '@agilo/font-loader';
const font = fontLoader( {
fontFamily: 'FontFamily',
fontWeight: 700,
fontStyle: 'italic',
timeout: 5000,
} );
font.load()
.then( () => console.log( 'FontFamily is loaded!' ) )
.catch( (error) => console.error( error ); );
GNU General Public License v2.0