eric6/QScintilla/Editor.py

changeset 8158
16a34a0167ba
parent 8143
2c730d5fd177
child 8165
61ca9619decb
--- a/eric6/QScintilla/Editor.py	Sat Mar 13 11:52:01 2021 +0100
+++ b/eric6/QScintilla/Editor.py	Sat Mar 13 15:55:35 2021 +0100
@@ -1813,7 +1813,10 @@
             self.SCN_STYLENEEDED.connect(self.__styleNeeded)
         
         # get the font for style 0 and set it as the default font
-        key = 'Scintilla/{0}/style0/font'.format(self.lexer_.language())
+        if pyname and pyname.startswith("Pygments|"):
+            key = 'Scintilla/Guessed/style0/font'
+        else:
+            key = 'Scintilla/{0}/style0/font'.format(self.lexer_.language())
         fdesc = Preferences.Prefs.settings.value(key)
         if fdesc is not None:
             font = QFont(fdesc[0], int(fdesc[1]))

eric ide

mercurial