Socket
Book a DemoInstallSign in
Socket

@nutshelllabs/textkit

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nutshelllabs/textkit

An advanced text layout framework

latest
Source
npmnpm
Version
4.7.0
Version published
Weekly downloads
123
-66.3%
Maintainers
2
Weekly downloads
 
Created
Source

@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.

FAQs

Package last updated on 30 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts