Textrenderingfix

This pull request fixes text regressions, also included two sample files to test the text rendering. 
if I remove the trailing space, then the error message will be "undefined glyphlabel", which is deceptive.