Fix tick event check.
A bunch of text rendering fixes and improvements.