mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Check book: Follow recent releases of epubcheck in expecting .ttf files to have the mime-type application/vnd.ms-opentype in EPUB 3 books
This commit is contained in:
parent
8fac38cf4d
commit
4590d36660
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user