Make sure font weight value is within allowed range

Authored by mglb on Oct 1 2019, 7:26 PM.