def _set_font(self, font):
font_metrics = QtGui.QFontMetrics(font)<EOL>self._control.setTabStopWidth(self.tab_width * font_metrics.width('<STR_LIT:U+0020>'))<EOL>self._completion_widget.setFont(font)<EOL>self._control.document().setDefaultFont(font)<EOL>if self._page_control:<EOL><INDENT>self._page_control.document().setDefaultFont(font)<EOL><DEDENT>self.font_changed.emit(font)<EOL>
Sets the base font for the ConsoleWidget to the specified QFont.