mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
AZW3 Input: Generate mimetypes for fonts that match what the editor expects. Fixes #1993496 [problem converting EPUB to AZW3](https://bugs.launchpad.net/calibre/+bug/1993496)
This commit is contained in:
parent
9aea6019e1
commit
fc8c0979d1
@ -506,9 +506,16 @@ class Mobi8Reader:
|
||||
pass
|
||||
|
||||
opf.create_manifest_from_files_in([os.getcwd()], exclude=exclude)
|
||||
mime_map = {
|
||||
'text/html': 'application/xhtml+xml',
|
||||
'font/ttf': 'application/x-font-truetype',
|
||||
'font/otf': 'application/vnd.ms-opentype',
|
||||
'font/woff': 'application/font-woff',
|
||||
}
|
||||
for entry in opf.manifest:
|
||||
if entry.mime_type == 'text/html':
|
||||
entry.mime_type = 'application/xhtml+xml'
|
||||
n = mime_map.get(entry.mime_type)
|
||||
if n is not None:
|
||||
entry.mime_type = n
|
||||
opf.create_spine(spine)
|
||||
opf.set_toc(toc)
|
||||
ppd = getattr(self.header.exth, 'page_progression_direction', None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user