Textrenderingfix

This pull request fixes text regressions, also included two sample files to test the text rendering. 
Please use 2 space indentation.