fontWeightToNumber: {
    bold: number;
    bolder: number;
    lighter: number;
    normal: number;
} = ...

Some simplistic assumptions on font-weight by key-word.

This map is just meant for a rough decision on bold/non-bold, as the relative weight mapping ignores the required parent context for correct transformation.

Type declaration

  • bold: number

    Numeric representation for bold as it is typically used in browsers.

  • bolder: number

    Numeric representation for bolder. Value equals a typical value for bolder in computedStyleMap() when parent has font-weight bold.

  • lighter: number

    Numeric representation for lighter. Value equals a typical value for lighter in computedStyleMap() when parent has font-weight normal.

  • normal: number

    Numeric representation for normal as it is typically used in browsers.