def __init__(self):
        # get fonts
        self.get_fonts()
        if len(self.all_fonts) > 0:
            self.title = "switch"
            self.text_height += 3
            self.square_button -= 4
            self.height = (self.square_button * 3) + (self.padding_y * 2)
            self.width = 320
            self.w = FloatingWindow((self.width, self.height), self.title)
            # move buttons
            x = self.padding_x
            y = self.padding_y
            x1 = x + (self.square_button * 1) - 1
            x2 = x + (self.square_button * 2) - 2
            self.w._up = SquareButton(
                        (x1, y,
                        self.square_button,
                        self.square_button),
                        unichr(8673),
                        callback=self._up_callback)
            self.w._up_right = SquareButton(
                        (x2 + 8, y,
                        self.square_button % 8,
                        self.square_button - 8),
                        unichr(8599),
                        callback=self._up_right_callback,
                        sizeStyle=self.size_style)
            y += self.square_button - 1
            self.w._left = SquareButton(
                        (x, y,
                        self.square_button,
                        self.square_button),
                        unichr(8672),
                        callback=self._left_callback)
            self.w._right = SquareButton(
                        (x2, y,
                        self.square_button,
                        self.square_button),
                        unichr(8674),
                        callback=self._right_callback)
            y += self.square_button - 1
            self.w._down_left = SquareButton(
                        (x, y + 8,
                        self.square_button - 8,
                        self.square_button - 8),
                        unichr(8601),
                        callback=self._down_left_callback,
                        sizeStyle=self.size_style)
            self.w._down = SquareButton(
                        (x1, y,
                        self.square_button,
                        self.square_button),
                        unichr(8675),
                        callback=self._down_callback)
            # location
            y = self.padding_y
            x3 = x2 + self.square_button + 16
            self.w.box_font = Box(
                        (x3, y,
                        -self.padding_x,
                        self.text_height))
            self.w.box_font.text = TextBox(
                        (5, 0,
                        -self.padding_x,
                        -0),
                        '',
                        sizeStyle=self.size_style)
            y += self.text_height + self.padding_y
            self.w.box_glyph = Box(
                        (x3, y,
                        -self.padding_x,
                        self.text_height))
            self.w.box_glyph.text = TextBox(
                        (5, 0,
                        -self.padding_x,
                        -0),
                        '',
                        sizeStyle=self.size_style)
            y += self.text_height + self.padding_y
            self.w.box_layer = Box(
                        (x3, y,
                        -self.padding_x,
                        self.text_height))
            self.w.box_layer.text = TextBox(
                        (5, 0,
                        -self.padding_x,
                        -0),
                        '',
                        sizeStyle=self.size_style)
            # open
            if self.update():
                # bind
                # self.w.bind("became key", self.update_callback)
                self.w.bind("close", self.on_close_window)
                # observers
                addObserver(self, "update_callback", "newFontDidOpen")
                addObserver(self, "update_callback", "fontDidOpen")
                addObserver(self, "update_callback", "fontDidClose")
                # open window
                self.w.open()
        else:
            print no_font_open

    # methods
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/dialogs/glyph/switch.py/switchGlyphDialog.__init__/operator `-` -> `%`