node-measure-text-width

1.0.1 • Public • Published

node-measure-text-width

Install

$ npm i node-measure-text-width

Usage

const measureTextWidth = require("node-measure-text-width");

(async function () {
  console.time("measureTextWidth");
  const width = await measureTextWidth(
    "The quick brown fox jumps over the lazy dog.",
    "12px serif"
  );
  console.timeEnd("measureTextWidth"); // 1.083ms
  console.log(width); // 222.28125
})();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i node-measure-text-width

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

2.9 kB

Total Files

4

Last publish

Collaborators

  • hanai