Render configurable webfont testers for woff / woff2 / variable fonts
npm install fontsampler-jsA configurable standalone webfont type tester for displaying and manipulating sample text in the browser.
Fontsampler library ~13kb minified & gzipped
Fontsampler skin js & css ~15kb minified & gzipped
Support for:
* woff / woff2 / woff2 variable fonts
* available and configurable UI for:
* tester input
* font picker
* font size
* line height
* letter spacing
* alignment
* direction (ltr/rtl)
* language (html lang attr, triggering OT locl features)
* variable axes (configurable, not detected)
* opentype (configurable, not detected)
* API for manipulating the instances
* optional skin to enhance bare browser input UI
* configurable UI, options, font settings
* initialization on empty DOM node
* initialization on existing DOM structure (to use custom layout and UI)
Via npm:
$ npm install fontsampler-js
See underscoretype.github.io/fontsampler-js/ for
detailed examples.
A minimal example:
…
Currently work in progress and pre-release. API not stable and likely to change.
PRs, issue reports and feature requests welcome.
Development requirements:
$ npm install
If you use VSCode src compiling tasks should automatically be started, else see the package.json scripts.
For testing:
$ npm install -g protractor jasmine
$ webdriver-manager start
$ npm run test
See CHANGELOG.md
Licensed under MIT License