Improved glyph extraction