Fix a text drawing issue when tabs are used

Incorrect length was used in a substring range resulting in junk characters beyond the end of the string being printed.
Merge pull request #402 from runrevfraser/refactor-syntax_unicode_tabs

Fix a text drawing issue when tabs are used