Show More
@@ -441,18 +441,17 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
441 | def reset_font(self): |
|
441 | def reset_font(self): | |
442 | """ Sets the font to the default fixed-width font for this platform. |
|
442 | """ Sets the font to the default fixed-width font for this platform. | |
443 | """ |
|
443 | """ | |
|
444 | font = QtGui.QFont() | |||
444 | if sys.platform == 'win32': |
|
445 | if sys.platform == 'win32': | |
445 | # FIXME: we should test whether Consolas is available and use it |
|
446 | # Prefer Consolas, but fall back to Courier if necessary. | |
446 | # first if it is. Consolas ships by default from Vista onwards, |
|
447 | font.setFamily('Consolas') | |
447 | # it's *vastly* more readable and prettier than Courier, and is |
|
448 | if not font.exactMatch(): | |
448 | # often installed even on XP systems. So we should first check for |
|
449 | font.setFamily('Courier') | |
449 | # it, and only fallback to Courier if absolutely necessary. |
|
|||
450 | name = 'Courier' |
|
|||
451 | elif sys.platform == 'darwin': |
|
450 | elif sys.platform == 'darwin': | |
452 |
|
|
451 | font.setFamily('Monaco') | |
453 | else: |
|
452 | else: | |
454 |
|
|
453 | font.setFamily('Monospace') | |
455 |
font |
|
454 | font.setPointSize(QtGui.qApp.font().pointSize()) | |
456 | font.setStyleHint(QtGui.QFont.TypeWriter) |
|
455 | font.setStyleHint(QtGui.QFont.TypeWriter) | |
457 | self._set_font(font) |
|
456 | self._set_font(font) | |
458 |
|
457 |
General Comments 0
You need to be logged in to leave comments.
Login now