weight_of_style
The CSS weight a style name stands for, as design tools and font files write it: Thin 100,
ExtraLight 200, Light 300, Regular 400, Medium 500, SemiBold 600, Bold 700,
ExtraBold 800, Black 900, ExtraBlack 950. Case, spaces, hyphens and underscores are
ignored ("Semi Bold Italic", "semi-bold", "SEMIBOLD"), and so are other words such as
Italic or Condensed.
Import
Section titled “Import”Cargo feature font (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
style | &str | The style name. |
Returns
Section titled “Returns”f64 — The weight, or 400.0 when the name holds no weight word.
