Skip to content

Function: normalizeFontWeight() ​

ts
function normalizeFontWeight(weight): number;

Experimental

Normalize a CSS weight keyword or number to a number in [1, 1000] (invalid → 400).

Parameters ​

ParameterType
weightTextFontWeight | undefined

Returns ​

number

Released under the MIT License.