node-fontnik/API.md
Lauren Budorick b058c5d0a8 Update API.md
2015-05-06 11:10:15 -04:00

21 lines
521 B
Markdown

## `fontnik`
### `range(options: object, callback: function)`
Get a range of glyphs as a protocol buffer. `options` is an object with options:
* `font: buffer`
* `start: number`
* `end: number`
`font` is the actual font file.
### `load(font: buffer, callback: function)`
Read a font's metadata. Returns an object like
``` json
"family_name": "Open Sans",
"style_name": "Regular",
"points": [32,33,34,35…]
```
where `points` is an array of numbers corresponding to unicode points where this font face has coverage.