code: def font(self, prefix, size):
          
          font = QFont(self.fontname[prefix])
          font.setPixelSize(size)
          if prefix[-1] == 's':  # solid style
              font.setStyleName('Solid')
          return font
docs: Return a QFont corresponding to the given prefix and size.