mirror of
https://github.com/mapbox/node-fontnik.git
synced 2025-12-08 20:16:18 +00:00
721 B
721 B
fontnik
range(options: object, callback: function)
Get a range of glyphs as a protocol buffer. options is an object with options:
font: bufferstart: numberend: number
font is the actual font file.
callback will be called as callback(err, res) where res is the protocol buffer result.
load(font: buffer, callback: function)
Read a font's metadata. Returns an object like
"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.
callback will be called as callback(err, res) where res is an array of font style object metadata.