UNPKG
calculate-size
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
0.2.0
0.1.0
Calculate the pixel size of a string
github.com/schickling/calculate-size
schickling/calculate-size
calculate-size
/
lib
/
index.d.ts
13 lines
(12 loc)
•
287 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
interface
OptionalOptions
{
font
?:
string
;
fontSize
?:
string
;
fontWeight
?:
string
;
width
?:
string
; }
export
interface
Size
{
width
:
number
;
height
:
number
; }
declare
var
_default
:
(
text
:
string
,
options
?:
OptionalOptions
) =>
Size
;
export
default
_default;