Could you call editGlyph around this point, to avoid so much code duplication?