Skip to content

joaopjt/font-avaiable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Font Avaiable

⚡ Lightweight code to verify if a font is avaiable on client browser

Getting Started

Download the script file clicking here

OR

Install package via npm:

npm install font-avaiable

Creating instance

<script src="fontavaiable.min.js"></script> // Import downloaded script file
<script type="text/javascript">
  console.log(fontAvaiable('Arial')); // true
</script>

You can import the module with ES6 syntax too:

// const isFontAvaiable = require('font-avaiable');
import isFontAvaiable from 'font-avaiable';

isFontAvaiable('Comic Sans MS'); // Return `true` if font is avaiable.

Contribute

In first of all, fork the repo.

After clone the fork, make sure of use node v6.11.4. Install the dependencies, and rollup globally. To build files, use the rollup -c or npm run build/yarn build.

Then, make a pull request with a nice description of changes.

License

MIT License.

Made with ❤️ by

Be part of this list too, contribute with us :)

About

Fastest method to verify if a font is avaiable on client.

Resources

Stars

Watchers

Forks

Packages

No packages published