1.1.1 • Published 6 years ago

unicode-pixel-width v1.1.1

Weekly downloads
67
License
MIT
Repository
github
Last release
6 years ago

unicode-pixel-width

String pixel width measurement supporting all Unicode characters

Supported fonts:

  • Arial

Usage

const pixelWidth = require('unicode-pixel-width');

pixelWidth('My text ...', { font: 'Arial', size: 13 }); // 56.55px
pixelWidth('0123456789', { font: 'Arial', size: 13 }); // 72.8px
pixelWidth('ؤإئبةتثجحخدذرزسشصضطظغؼؽؾؿـفقكلمنهوىي', { font: 'Arial', size: 13 }); // 269.62px
pixelWidth('😀😁😂😃😄😅😆😇😈', { font: 'Arial', size: 13 }); // 144px
1.1.1

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago