From 34ce7f735c976a55fe4660cfcf24d92d04e81af3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 6 Jul 2022 19:11:14 +0530 Subject: [PATCH] Make font-weight: 600 or 700 into font-weight: bold --- src/calibre/gui2/comments_editor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 436017f60a..6e350196c2 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -206,6 +206,9 @@ def cleanup_qt_markup(root): remove_zero_indents(ts) for style in itervalues(style_map): filter_qt_styles(style) + fw = style.get('font-weight') + if fw in ('600', '700'): + style['font-weight'] = 'bold' for tag, style in iteritems(style_map): if style: tag.set('style', '; '.join(f'{k}: {v}' for k, v in iteritems(style)))