0.0.8 • Published 6 months ago

@safs.io/typesetter v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

https://typesetter.onrender.com/

TODO

  • docs
  • test coverage
  • better typing
  • remove ramda
  • remove hypher and en-us. make them optional with instructions in readme.
  • publish to npm
  • 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
});
0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4-a

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago