Make font-weight: 600 or 700 into font-weight: bold

This commit is contained in:
Kovid Goyal 2022-07-06 19:11:14 +05:30
parent 13d0de53ba
commit 34ce7f735c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -206,6 +206,9 @@ def cleanup_qt_markup(root):
remove_zero_indents(ts) remove_zero_indents(ts)
for style in itervalues(style_map): for style in itervalues(style_map):
filter_qt_styles(style) 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): for tag, style in iteritems(style_map):
if style: if style:
tag.set('style', '; '.join(f'{k}: {v}' for k, v in iteritems(style))) tag.set('style', '; '.join(f'{k}: {v}' for k, v in iteritems(style)))