diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index d9f5f5aac2..ece50b23c5 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -149,8 +149,14 @@ class ContainerBase(object): # {{{ ans = guess_type(name) if ans == 'text/html': ans = 'application/xhtml+xml' - if ans in {'application/x-font-truetype', 'application/vnd.ms-opentype'} and self.opf_version_parsed[:2] > (3, 0): - return 'application/font-sfnt' + if ans in {'application/x-font-truetype', 'application/vnd.ms-opentype'}: + opfversion = self.opf_version_parsed[:2] + if opfversion > (3, 0): + return 'application/font-sfnt' + if opfversion >= (3, 0): + # bloody epubcheck has recently decided it likes this mimetype + # for ttf files + return 'application/vnd.ms-opentype' return ans def decode(self, data, normalize_to_nfc=True):