KF8 Input: Do not link to font files that we failed to properly extract

This commit is contained in:
Kovid Goyal 2012-03-13 10:00:37 +05:30
parent ce90b49fb5
commit 341f0d73c7

View File

@ -154,6 +154,8 @@ def update_flow_links(mobi8_reader, resource_map, log):
'valid font in %s' % (num, tag))
else:
replacement = '"%s"'%('../'+ href)
if href.endswith('.dat'):
replacement = 'unable-to-extract.ttf'
tag = font_index_pattern.sub(replacement, tag, 1)
# process links to other css pieces