jtype

0.3.0 • Public • Published

jtype

Module measures font strings and characters. Give it a string and a style object, a dictionary is returned with size data about each letter, and some other metadata.

If you do not pass a string value, it will return a dictionary of measurements for [a-zA-Z0-9] plus punctuations.

example

var alpha = require('./');

var styles = {}
styles.fontFamily = 'Georgia';
styles.fontSize = '30px';
styles.letterSpacing = '3px';

var dict = alpha(styles) 

console.log(dict)

var stringDict = alpha('king of infinite space', styles)

console.log(stringDict)

Readme

Keywords

none

Package Sidebar

Install

npm i jtype

Weekly Downloads

0

Version

0.3.0

License

MIT

Last publish

Collaborators

  • johnnyscript