fast-font-info
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i fast-font-info

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

287 kB

Total Files

15

Last publish

Collaborators

  • xvan-turing