Assign an ID to the font NAME. Return its ID.

def __register_font(self, name):
        "Assign an ID to the font NAME. Return its ID."
        if name not in self.__registered_fonts:
            self.__registered_fonts[name] = self.__next_font_id
            self.__next_font_id += 1
        return self.__registered_fonts[name]