Skip to content

Commit

Permalink
Edit Book: Change the recommended mimetype for ttf/otf files to appli…
Browse files Browse the repository at this point in the history
…cation/font-sfnt for EPUB 3.1 documents
  • Loading branch information
kovidgoyal committed Jun 30, 2016
1 parent 6bb8a2e commit 86f1145
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/calibre/ebooks/oeb/polish/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def guess_type(self, name):
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):
Expand Down

0 comments on commit 86f1145

Please sign in to comment.