Char styles

Fix bug in character styles from rewrite, and add test.