npm.io
1.11.0 • Published 10 months ago

@types/string-pixel-width

Licence
MIT
Version
1.11.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.