Add weight function for keyword-based font-weight.