From e3a06ca243c7760bc95a9a6d60c44517df3f0e18 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 6 Jul 2022 18:53:37 +0530 Subject: [PATCH] Qt6 uses a font-weight of 700 for bold --- src/calibre/gui2/comments_editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 64c1067c85..a7404ac405 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -103,13 +103,13 @@ def remove_heading_font_styles(tag, style): expected_size = (None, 'xx-large', 'x-large', 'large', None, 'small', 'x-small')[lvl] if style.get('font-size', 1) == expected_size: del style['font-size'] - if style.get('font-weight') == '600': + if style.get('font-weight') in ('600', '700'): del style['font-weight'] def use_implicit_styling_for_span(span, style): is_italic = style.get('font-style') == 'italic' - is_bold = style.get('font-weight') == '600' + is_bold = style.get('font-weight') in ('600', '700') if is_italic and not is_bold: del style['font-style'] span.tag = 'em'