def _up_right_callback(self, sender):
        if len(self.all_fonts) > 1:
            # get next font
            f = CurrentFont()
            i = self.all_fonts.index(f)
            try:
                next_i = i + 1
                next_font = self.all_fonts[next_i]
            except __HOLE__:
                next_i = 0
                next_font = self.all_fonts[next_i]
            # get glyph
            g_current = CurrentGlyph()
            if g_current is not None:
                if next_font.has_key(g_current.name):
                    next_glyph = next_font[g_current.name]
                else:
                    next_glyph = next_font[next_font.glyphOrder[0]]
                # switch to glyph window
                G = OpenGlyphWindow(next_glyph, newWindow=False)
                # update UI
                self.update()
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/dialogs/glyph/switch.py/switchGlyphDialog._up_right_callback