labelTextfunction
A name with the look's case applied. Japanese letters have no case and are never changed, and small-caps leaves the name as written for the page to draw with font-variant: small-caps.
Import it
import { labelText } from "@johnmorrisdotca/hoshi-stars/sky-labels";
Definition
function labelText(name: string, style: LabelStyle): string
Parameters
| Name | Type | Description |
|---|---|---|
name | string | The name as written. |
style | LabelStyle | A complete look. |
Returns
string
The text to draw.
Examples
import { labelStyle, labelText } from "@johnmorrisdotca/hoshi-stars/sky-labels";
console.log(labelText("Sirius", labelStyle({ case: "upper" })), labelText("シリウス", labelStyle({ case: "upper" })));SIRIUS シリウスWhat it prints (run when this page was built)