Method GetLighterFontWeight
- Namespace
- SharpVectors.Renderers.Texts
- Assembly
- SharpVectors.Rendering.Wpf.dll
GetLighterFontWeight(string)
Resolves one step lighter font-weight from a given parent font-weight value.
protected FontWeight GetLighterFontWeight(string fontWeight)
Parameters
fontWeightstringThe parent font-weight value (CSS keyword or numeric string).
Returns
- FontWeight
One step lighter than the input weight.
Remarks
Specification: CSS Font Module Level 3, Section 3.3 (font-weight)
This method implements the "lighter" keyword semantics, moving from the current weight down one step in the CSS weight hierarchy:
- 100 → Thin (100, clamped minimum)
- 200 → Thin (100)
- 300 → Thin (100)
- 400 → Light (300)
- 500 → Light (300)
- 600 → Normal (400)
- 700 → Normal (400)
- 800 → SemiBold (600)
- 900 → Bold (700)
- 950 → Bold (700)
Non-Standard Numeric: Non-standard numeric values decrement by ~100 and are rounded to the nearest standard weight.
Default: Empty or invalid input returns Normal (400).