Edit Book: Change the recommended mimetype for ttf/otf files to application/font-sfnt for EPUB 3.1 documents

This commit is contained in:
Kovid Goyal 2016-06-30 15:23:44 +05:30
parent 6bb8a2eb7e
commit 86f114594c

View File

@ -125,6 +125,8 @@ 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'
return ans
def decode(self, data, normalize_to_nfc=True):