1.0.3 • Published 6 years ago

fast-font-info v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Font Chars

Node.js Only

For What?

You can use this library to get the all char-code(unicode) from a font, supported format: TTF OTF WOFF

woff2 will be supported soon

How To

const cmap = require("font-chars");
const fontPath = "./fonts/segoeui.ttf";
cmap.loadCMap(fontPath, (err, result) => {
  console.log(result.glyphIndexArray);
});

glyphIndexArray :

glyphIndexArray = [[startUnicde, end], [start, end], [start, end]];
// include end value

License

This project is based on opentype.js If you want full support of reading font,getting glyph path,creating font ... on browser, the opentype.js is your best choice. All my code is under MIT License.The fonts in fonts dir is test only.