mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Handle embed font family and filter css conflict
Conversion: If both embed font family and the filter css option to remove fonts are set, do not remove the font specified by the embed font family option.
This commit is contained in:
parent
42cc5b2813
commit
1c0849446b
@ -410,7 +410,10 @@ class CSSFlattener(object):
|
||||
|
||||
if cssdict:
|
||||
for x in self.filter_css:
|
||||
cssdict.pop(x, None)
|
||||
popval = cssdict.pop(x, None)
|
||||
if (self.body_font_family and popval and x == 'font-family' and
|
||||
popval.partition(',')[0][1:-1] == self.body_font_family.partition(',')[0][1:-1]):
|
||||
cssdict[x] = popval
|
||||
|
||||
if cssdict:
|
||||
if self.lineh and self.fbase and tag != 'body':
|
||||
|
Loading…
x
Reference in New Issue
Block a user