font-avaiable
v1.0.2
Published
Lightweight function for verify if a font is avaiable on client.
Downloads
7
Maintainers
Readme
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
Made with ❤️ by
Be part of this list too, contribute with us :)