@safs.io/typesetter
v0.0.8
Published
https://typesetter.onrender.com/
Downloads
3
Readme
https://typesetter.onrender.com/
TODO
- [ ] docs
- [ ] test coverage
- [ ] better typing
- [ ] remove
ramda
- [ ] remove
hypher
anden-us
. make them optional with instructions in readme. - [x] publish to npm
- [x] improve api
Hyphenation
This library supports optional hyphenation. hypher
seems to work well but any object with a hyphenate
method that returns an array of syllables will work. example:
npm i hypher hyphenation.en-us
import Hypher from 'hypher';
import english from 'hyphenation.en-us';
const hyphenator = new Hypher(english);
SvgTypesetter({
text: 'some text that you want hyphenated when formatting',
targetNode: textEl,
parentNode: gEl,
alignment: 'center',
lineLengths: [60],
tolerance: 20000,
hyphenator
});