Improve glyph cursor handling. Fixes #15.