@midhunpm/node-text-width

1.0.2 • Public • Published

node-text-width

A simple node library for find the width of text in Node JS, We are using canvas for analyze the width so it's lightweight and more quick than other librabries.

How to use

const getWidth = require('node-text-width');

let width = getWidth("text", { font: "Arial", fontSize: 15});

Options

option type description
font string font name
fontSize number font size

Package Sidebar

Install

npm i @midhunpm/node-text-width

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

38.3 kB

Total Files

5

Last publish

Collaborators

  • midhunpm