Détail du package

anafanafo

metabolize106.1kMIT2.0.0

Compute text width in Verdana

readme

anafanafo

version license build bundle size code style lerna

Efficiently compute text width in Verdana and Helvetica using char-width-table-consumer and lookup tables.

Built with Shields in mind.

(And because Verdana always makes me think of this.)

Usage

const anafanafo = require('anafanafo')

// Supports '11px Verdana', '10px Verdana', 'bold 10px Verdana', and 'bold 11px Helvetica'.
const width = anafanafo('Shirley Shirley', { font: '11px Verdana' })

License

All rights to Verdana are owned by Microsoft Corp.

The remainder of this project is licensed under the MIT license.

changelog

Changelog

2.0.0 – Oct 15, 2020

Same as 2.0.0-beta.1.

BREAKING CHANGES

  • Support the font variants used by Shields:
    • 10px Verdana
    • bold 10px Verdana
    • 11px Verdana
    • bold 11px Helvetica

2.0.0-beta.1 – Oct 11, 2020

BREAKING CHANGES

  • Support the font variants used by Shields:
    • 10px Verdana
    • bold 10px Verdana
    • 11px Verdana
    • bold 11px Helvetica

2.0.0-beta.0 – Oct 11, 2020

BREAKING CHANGES

  • Support 10px and 11px Verdana, in normal and bold.

1.0.0 – Apr 12, 2018

  • Update dependencies.
  • Stable API.

0.1.1 – Nov 15, 2018

  • Require the JSON file (instead of loadSync-ing it) to play well with module bundlers.

0.1.0 – Nov 13, 2018

Initial release.