@nutshelllabs/textkit
v4.7.0
Published
An advanced text layout framework
Downloads
485
Readme
@nutshelllabs/textkit
Acknowledges
This project is a fork of textkit by @devongovett and continued under the scope of this project since it has react-pdf specific features. Any recongnition should go to him and the original project mantainers.
Layout process
- split into paragraphs
- get bidi runs and paragraph direction
- font substitution - map to resolved font runs
- script itemization
- font shaping - text to glyphs
- line breaking
- bidi reordering
- justification
- get a list of rectangles by intersecting path, line, and exclusion paths
- perform line breaking to get acceptable break points for each fragment
- ellipsize line if necessary
- bidi reordering
- justification
Performance
This package was not originally optimized for speed in regards to batch rendering of PDFs. Changes are in the works to speed up this use-case.