Re-measure character widths when stylesheets change

Fixes #2845