--- 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]))