mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Detect two char dropcaps when the first char is punctuation
This commit is contained in:
parent
6fe47ec867
commit
a147d96b2f
@ -426,7 +426,7 @@ class CSSFlattener(object):
|
||||
fsize = font_size
|
||||
is_drop_cap = (cssdict.get('float', None) == 'left' and 'font-size' in
|
||||
cssdict and len(node) == 0 and node.text and
|
||||
len(node.text) == 1)
|
||||
(len(node.text) == 1 or (len(node.text) == 2 and 0x2000 <= ord(node.text[0]) <= 0x206f)))
|
||||
# Detect drop caps generated by the docx input plugin
|
||||
if (node.tag and node.tag.endswith('}p') and len(node) == 0 and node.text and len(node.text.strip()) == 1 and
|
||||
not node.tail and 'line-height' in cssdict and 'font-size' in cssdict):
|
||||
@ -660,4 +660,3 @@ class CSSFlattener(object):
|
||||
for item in self.oeb.spine:
|
||||
stylizer = self.stylizers[item]
|
||||
self.flatten_head(item, href, global_css[item])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user