From 341f0d73c77d5a29be18c404a58d6fffb42db2d0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 13 Mar 2012 10:00:37 +0530 Subject: [PATCH] KF8 Input: Do not link to font files that we failed to properly extract --- src/calibre/ebooks/mobi/reader/markup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/mobi/reader/markup.py b/src/calibre/ebooks/mobi/reader/markup.py index cb47297717..03e65951b4 100644 --- a/src/calibre/ebooks/mobi/reader/markup.py +++ b/src/calibre/ebooks/mobi/reader/markup.py @@ -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