Move calculation of text chunk attributes from renderer to TextChunk implementation.