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