mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix error when input document contains a font size exactly one point away from the base size. Fixes #1472291 [Convert from HTM to mobi](https://bugs.launchpad.net/calibre/+bug/1472291)
This commit is contained in:
parent
9bce68c323
commit
d707a4778f
@ -62,6 +62,8 @@ class KeyMapper(object):
|
||||
endp = 0 if size < base else 36
|
||||
diff = (abs(base - size) * 3) + ((36 - size) / 100)
|
||||
logb = abs(base - endp)
|
||||
if logb == 1.0:
|
||||
logb = 1.1
|
||||
try:
|
||||
result = sign * math.log(diff, logb)
|
||||
except ValueError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user