Factored out AttributedStringRenderer