improved glyph handling