tests and implementation for text renderer