Skip to content

midhun1993/text-width

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Find the width of text/paragraph in NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published