mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
5d6911a503
commit
09888e4bc3
@ -196,7 +196,7 @@ class Text(Element):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def set_av_char_width(self):
|
def set_av_char_width(self):
|
||||||
self.average_character_width = max(self.width/len(self.text_as_string),0.1) # Ensure never zero
|
self.average_character_width = max(0.1, self.width/max(1, len(self.text_as_string))) # Ensure never zero
|
||||||
|
|
||||||
def coalesce(self, other, page_number, left_margin, right_margin):
|
def coalesce(self, other, page_number, left_margin, right_margin):
|
||||||
if self.opts.verbose > 2:
|
if self.opts.verbose > 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user