code: def set_font(self, font):
          
          self.setFont(font)
          self.set_pythonshell_font(font)
          cursor = self.textCursor()
          cursor.select(QTextCursor.Document)
          charformat = QTextCharFormat()
          charformat.setFontFamily(font.family())
          charformat.setFontPointSize(font.pointSize())
          cursor.mergeCharFormat(charformat)
docs: Set shell styles font