labelHeightfunction
The height a line of text takes in pixels: 1.2 times its size.
Import it
import { labelHeight } from "@johnmorrisdotca/hoshi-stars/sky-labels";
Definition
function labelHeight(style: LabelStyle): number
Parameters
| Name | Type | Description |
|---|---|---|
style | LabelStyle | A complete look. |
Returns
number
The height in pixels.
Examples
import { labelHeight, labelStyle } from "@johnmorrisdotca/hoshi-stars/sky-labels";
console.log(labelHeight(labelStyle({ size: 20 })));24What it prints (run when this page was built)