Example #1
0
    def update_font_display(self):
        font = self.build_font_obj()
        fi = QFontInfo(font)
        name = unicode(fi.family())

        self.font_display.setFont(font)
        self.font_display.setText(name + ' [%dpt]' % fi.pointSize())
Example #2
0
    def update_font_display(self):
        font = self.build_font_obj()
        fi = QFontInfo(font)
        name = unicode(fi.family())

        self.font_display.setFont(font)
        self.font_display.setText(name + " [%dpt]" % fi.pointSize())
Example #3
0
 def change_font(self, *args):
     fd = QFontDialog(self.build_font_obj(), self)
     if fd.exec_() == fd.Accepted:
         font = fd.selectedFont()
         fi = QFontInfo(font)
         self.current_font = [unicode(fi.family()), fi.pointSize(), fi.weight(), fi.italic(), font.stretch()]
         self.update_font_display()
         self.changed_signal.emit()
Example #4
0
 def change_font(self, *args):
     fd = QFontDialog(self.build_font_obj(), self)
     if fd.exec_() == fd.Accepted:
         font = fd.selectedFont()
         fi = QFontInfo(font)
         self.current_font = [unicode(fi.family()), fi.pointSize(),
                 fi.weight(), fi.italic(), font.stretch()]
         self.update_font_display()
         self.changed_signal.emit()