def newGlyph(self, name):
        """
        Create a new glyph with **name**. If a glyph with that
        name already exists, the existing glyph will be replaced
        with the new glyph.
        """
        if name in self:
            self._unicodeData.removeGlyphData(name, self[name].unicodes)
        glyph = self._instantiateGlyphObject()
        glyph.name = name
        self._glyphs[name] = glyph
        self._setParentDataInGlyph(glyph)
        self.dirty = True
        # a glyph by the same name could be
        # scheduled for deletion
        if name in self._scheduledForDeletion:
            self._scheduledForDeletion.remove(name)
        # keep the keys up to date
        self._keys.add(name)
dataset/ETHPy150Open typesupply/defcon/Lib/defcon/objects/font.py/Font.newGlyph/original