mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
IGN:...
This commit is contained in:
parent
376aac607d
commit
4706660425
@ -98,7 +98,7 @@ class EbookIterator(object):
|
||||
url = re.compile(r'url\s*\([\'"]*(.+?)[\'"]*\)', re.DOTALL).search(block)
|
||||
if url:
|
||||
path = url.group(1).split('/')
|
||||
path = os.path.join(os.path.dirname(item.path), *path)
|
||||
path = os.path.join(os.path.dirname(item.path), *path)
|
||||
id = QFontDatabase.addApplicationFont(path)
|
||||
if id != -1:
|
||||
families = [unicode(f) for f in QFontDatabase.applicationFontFamilies(id)]
|
||||
@ -106,6 +106,8 @@ class EbookIterator(object):
|
||||
family = family.group(1).strip().replace('"', '')
|
||||
if family not in families:
|
||||
print 'WARNING: Family aliasing not supported:', block
|
||||
else:
|
||||
print 'Loaded embedded font:', repr(family)
|
||||
|
||||
def __enter__(self):
|
||||
self._tdir = TemporaryDirectory('_ebook_iter')
|
||||
|
@ -43,7 +43,7 @@ class KeyMapper(object):
|
||||
sign = -1 if size < base else 1
|
||||
endp = 0 if size < base else 36
|
||||
diff = (abs(base - size) * 3) + ((36 - size) / 100)
|
||||
logb = abs(base - endp)
|
||||
logb = abs(base - endp)
|
||||
result = sign * math.log(diff, logb)
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user