def get_container(*args, **kwargs): kwargs['tweak_mode'] = True container = _gc(*args, **kwargs) # We preload the embedded fonts from this book, so that the preview panel # works font_cache.remove_fonts() for name, mt in container.mime_map.iteritems(): if mt in OEB_FONTS and container.exists(name): with container.open(name, 'rb') as f: raw = f.read() font_cache.add_font(raw) return container
def get_container(*args, **kwargs): kwargs['tweak_mode'] = True return _gc(*args, **kwargs)