spyder.api.fonts#
Helper classes to get and set the fonts used in Spyder.
Classes
Font types used in Spyder plugins and the entire application. |
|
Mixin to get the different Spyder font types from our config system. |
- class spyder.api.fonts.SpyderFontType[source]#
Bases:
objectFont types used in Spyder plugins and the entire application.
This enum is meant to be used to get the
QFontobject corresponding to each type. These are:Monospaceis used in the Editor, IPython Console and History panesInterfaceis used by the entire Spyder applicationMonospaceInterfaceis used, for instance, by the Variable Explorer and corresponds to theMonospacefont resized to look good together with theInterfacefont.
Note
The values names in this enum are a result of historical reasons that date from Spyder 2 and are not easy to change now.
- class spyder.api.fonts.SpyderFontsMixin[source]#
Bases:
objectMixin to get the different Spyder font types from our config system.
- classmethod get_font(font_type: str, font_size_delta: int = 0) QFont[source]#
Get a font type as a
QFontobject.- Parameters:
font_type (str) – A Spyder font type, one of the
SpyderFontTypeenum values.font_size_delta (int, optional) – Increase or decrease the default font size by this amount. The default is 0.