serious cleanup of the text glyph code