Package Exports
- cssfontparser
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cssfontparser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ccsfontparser
parse shorthand css font declarations into an object
install
npm install cssfontparser
use
var parse = require('cssfontparser');
var obj = parse('italic small-caps bolder 50%/20px serif', '1in san-serif', 400);
console.log(obj);
/* outputs:
{ style: 'italic',
variant: 'small-caps',
weight: 'bolder',
size: 200,
lineHeight: 20,
family: 'serif' }
*/
console.log(obj.toString());
/* outputs:
'italic small-caps bolder 200px/20px serif'
*/
#signature
cssfontparser
("font string"
[,"parent font string"
[, dpi
= 96.0
]]);
note: a parent font string
is required for em
and %
size calculations.