@agilo/font-loader
v0.2.1
Published
> a lightweight font loader
Downloads
4
Keywords
Readme
Font Loader
a lightweight font loader
Install
With npm installed, run
npm install @agilo/font-loader
Usage
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 ); );
License
GNU General Public License v2.0