new version of textrender.c