This commit is contained in:
Kovid Goyal 2012-10-28 18:14:43 +05:30
parent c4b6ab96b2
commit 5b70d13765
2 changed files with 8 additions and 1 deletions

View File

@ -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())

View File

@ -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'):