from chimerax.cmd_line.tool import CommandLine from Qt.QtGui import QFont, QFontMetrics # change to control the size new_size = 16 # get the command line tool object cmd_line = CommandLine.get_singleton(session) # make a copy of the command line's current font, but with # larger/smaller text new_font = QFont(cmd_line.tool_window.ui_area.font()) new_font.setPointSize(new_size) cmd_line.tool_window.ui_area.setFont(new_font) # need to adjust the size of the text box to be appropriate # for the larger/smaller font metrics = QFontMetrics(new_font) min_height = int(1.1 * metrics.boundingRect("Qy").height() + 5) cmd_line.text.setMinimumHeight(min_height)