font-chars

0.2.0 • Public • Published

font-chars

Lists the unicode codepoints/characters of a font loaded by opentype.js

Heavily inspired by character-map (which is a CLI tool).

Usage

npm install font-chars
var opentype  = require('opentype.js')
  , fontChars = require('font-chars');

opentype.load('./path/to/font.ttf', function(err, font) {
    if (err) {
        console.log(err);
        return;
    }

    console.log(fontChars.getCodepoints(font));
});

The returned array contains unicode code points, they can be converted into human readable characters if needed.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    7
  • 0.1.0
    3

Package Sidebar

Install

npm i font-chars

Weekly Downloads

5

Version

0.2.0

License

MIT

Last publish

Collaborators

  • strarsis