--- a/eric6/QScintilla/Exporters/ExporterHTML.py Sun Jan 03 18:02:19 2021 +0100 +++ b/eric6/QScintilla/Exporters/ExporterHTML.py Sun Jan 03 22:24:05 2021 +0100 @@ -165,6 +165,28 @@ html += ''' font-size: {0:d}pt;\n'''.format( QFontInfo(font).pointSize()) html += '''}\n''' + + # get substyles + subs_start, subs_count = self.editor.getSubStyleRange( + istyle) + for subs_idx in range(subs_count): + styleIsUsed[subs_idx - subs_start] = True + font = lex.font(subs_start + subs_idx) + colour = lex.color(subs_start + subs_idx) + paper = lex.paper(subs_start + subs_idx) + html += '.S{0:d} {{\n'.format(subs_idx - subs_start) + if font.italic(): + html += ' font-style: italic;\n' + if font.bold(): + html += ' font-weight: bold;\n' + if wysiwyg: + html += " font-family: '{0}';\n".format( + font.family()) + html += ' color: {0};\n'.format(colour.name()) + if wysiwyg: + html += ' font-size: {0:d}pt;\n'.format( + QFontInfo(font).pointSize()) + html += '}\n' else: styleIsUsed[istyle] = False istyle += 1