# cssfontparser

> parse shorthand css font strings"

Latest version **1.2.1** (published 2015-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install cssfontparser
pnpm add cssfontparser
yarn add cssfontparser
bun add cssfontparser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2015-05-08 |
| First published | 2013-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Elijah Insua |
| Maintainers | tmpvar |
| Keywords | css, font, parsing, parser, shorthand |

## Links

- npm: https://www.npmjs.com/package/cssfontparser
- Repository: https://github.com/tmpvar/cssfontparser
- Issues: https://github.com/tmpvar/cssfontparser/issues
- npm.io page: https://npm.io/package/cssfontparser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2015-05-08
- 1.2.0 — 2015-05-08
- 1.1.0 — 2013-05-10
- 1.0.2 — 2013-05-04
- 1.0.1 — 2013-05-04
- 1.0.0 — 2013-05-04

## README

# ccsfontparser

parse shorthand css font declarations into an object

# install

`npm install cssfontparser`

# use

```javascript

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.

# license

---
_Source: https://npm.io/package/cssfontparser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
