hasFont.js
A simple script to check that the user has the font or not. It's vanilla JavaScript, no dependency required.
You can see it in action here: https://codincat.github.io/hasFont.js/
Usage
npm install --save has-font
or
// hasFont(fontNameString) if elementstylefontSize = '10px' else elementstylefontSize = '12px'