mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle badly malformed font sizes in CSS
This commit is contained in:
parent
a4e2d6acb5
commit
e9eaee4969
@ -411,6 +411,8 @@ class Style(object):
|
|||||||
result = size
|
result = size
|
||||||
else:
|
else:
|
||||||
result = self._unit_convert(value, base=base, font=base)
|
result = self._unit_convert(value, base=base, font=base)
|
||||||
|
if not isinstance(result, (int, float, long)):
|
||||||
|
return base
|
||||||
if result < 0:
|
if result < 0:
|
||||||
result = normalize_fontsize("smaller", base)
|
result = normalize_fontsize("smaller", base)
|
||||||
if factor:
|
if factor:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user