You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ The ["Klokantech Noto Sans"](https://github.com/klokantech/klokantech-gl-fonts)
10
10
11
11
```js
12
12
var parseFont =require('mapbox-to-css-font');
13
-
parseFont('Open Sans Regular', 16);
14
-
// returns 'normal 400 16px "Open Sans"'
13
+
parseFont('Open Sans Regular', 16, 1.2);
14
+
// returns 'normal 400 16px/1.2 "Open Sans"'
15
15
```
16
16
17
17
## API
@@ -22,4 +22,6 @@ parseFont('Open Sans Regular', 16);
22
22
23
23
-`size`**[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Font size in pixels.
24
24
25
-
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** CSS font definition, e.g. `'normal 400 16px "Open Sans"'`.
25
+
-`lineHeight`**[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)|[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Line height as css [line-height](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height). Optional.
26
+
27
+
Returns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** CSS font definition, e.g. `'normal 400 16px/1.2 "Open Sans"'`.
0 commit comments