Author: | ilovecode1 |
---|---|
Views Total: | 71 views |
Official Page: | Go to website |
Last Update: | January 24, 2018 |
License: | MIT |
Preview:

Description:
fontjs is a lightweight font manipulation library used to dynamically set CSS font properties (font family, font size, font weight, etc) in JavaScript.
How to use it:
Download and import the font.js into the document.
<script src="font.js"></script>
Create a new instance of the fontjs.
var instance = Font("instance");
Specify the font you want to load.
instance.setURL(url)
Specify the font style.
instance.setStyle(style)
Specify the font size.
instance.setSize(size)
Specify the font weight.
instance.setWeight(weight)
Specify the font variant.
instance.setVariant(variant)
Specify the font stretch.
instance.setStrech(strech)