Installation
npm install --save @types/string-pixel-width
Summary
This package contains type definitions for string-pixel-width (https://github.com/adambisek/string-pixel-width#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/string-pixel-width.
index.d.ts
export = getWidth;
declare function getWidth(string: string, settings?: getWidth.Settings): number;
declare namespace getWidth {
interface Settings {
bold?: boolean | undefined;
font?:
| "andale mono"
| "arial"
| "avenir"
| "avenir next"
| "comic sans ms"
| "courier new"
| "georgia"
| "helvetica"
| "impact"
| "inter"
| "times new roman"
| "trebuchet ms"
| "verdana"
| "webdings"
| "open sans"
| "tahoma"
| "quantify"
| undefined;
italic?: boolean | undefined;
size?: number | undefined;
}
}
Additional Details
- Last updated: Thu, 20 Nov 2025 1842 GMT
- Dependencies: none
Credits
These definitions were written by Graham Dyson.