mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Qt6 uses a font-weight of 700 for bold
This commit is contained in:
parent
21c2b5f048
commit
e3a06ca243
@ -103,13 +103,13 @@ def remove_heading_font_styles(tag, style):
|
|||||||
expected_size = (None, 'xx-large', 'x-large', 'large', None, 'small', 'x-small')[lvl]
|
expected_size = (None, 'xx-large', 'x-large', 'large', None, 'small', 'x-small')[lvl]
|
||||||
if style.get('font-size', 1) == expected_size:
|
if style.get('font-size', 1) == expected_size:
|
||||||
del style['font-size']
|
del style['font-size']
|
||||||
if style.get('font-weight') == '600':
|
if style.get('font-weight') in ('600', '700'):
|
||||||
del style['font-weight']
|
del style['font-weight']
|
||||||
|
|
||||||
|
|
||||||
def use_implicit_styling_for_span(span, style):
|
def use_implicit_styling_for_span(span, style):
|
||||||
is_italic = style.get('font-style') == 'italic'
|
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:
|
if is_italic and not is_bold:
|
||||||
del style['font-style']
|
del style['font-style']
|
||||||
span.tag = 'em'
|
span.tag = 'em'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user