mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c4b6ab96b2
commit
5b70d13765
@ -111,4 +111,9 @@ class FontMetadata(object):
|
||||
ans[f] = getattr(self.characteristics, f)
|
||||
return ans
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
with open(sys.argv[-1], 'rb') as f:
|
||||
fm = FontMetadata(f)
|
||||
import pprint
|
||||
pprint.pprint(fm.to_dict())
|
||||
|
@ -55,6 +55,7 @@ class Scanner(Thread):
|
||||
self.font_families = ()
|
||||
self.allowed_extensions = allowed_extensions
|
||||
|
||||
# API {{{
|
||||
def find_font_families(self):
|
||||
self.join()
|
||||
return self.font_families
|
||||
@ -143,6 +144,7 @@ class Scanner(Thread):
|
||||
if f in found:
|
||||
return found[f]
|
||||
return None, None
|
||||
# }}}
|
||||
|
||||
def reload_cache(self):
|
||||
if not hasattr(self, 'cache'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user