Sort glyphs before writing them to disk