0.2.1 • Published 4 years ago

@agilo/font-loader v0.2.1

Weekly downloads
-
License
GPL-2.0-only
Repository
github
Last release
4 years ago

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