Skip to content
Read font information from ttf/ttc file with browser. Online preview
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.babelrc
.gitignore
README.md
bundle.js
index.js
package.json
rollup.config.js
test.html
yarn.lock

README.md

FontReader

read font information from ttf/ttc file for browser

Usage

with es6

import { TTFReader, TTCReader } from './bundle';
// for ttf file
new TTFReader(buffer).getAttrs();
// for ttc file
new TTCReader(buffer).getAttrs();

with script tag

<script src="./bundle.js"></script>
<script>
  // for ttf file
  new FontReader.TTFReader(buffer).getAttrs();
  // for ttc file
  new FontReader.TTCReader(buffer).getAttrs();
</script>
You can’t perform that action at this time.