mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:35:46 +02:00
MOBI Output: Fix latest kindle firmware not displaying select publisher font option for calibre produced azw3 files. Fixes #1920613 [Kindle Firmware 5.13.5 changed embedded font management](https://bugs.launchpad.net/calibre/+bug/1920613)
This commit is contained in:
parent
90020202f0
commit
1387cfc39f
1 changed files with 5 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
'language': 524,
|
||||
'primary_writing_mode': 525,
|
||||
'page_progression_direction': 527,
|
||||
'override_kindle_fonts': 528,
|
||||
}
|
||||
|
||||
COLLAPSE_RE = re.compile(r'[ \t\r\n\v]+')
|
||||
|
|
@ -221,6 +222,10 @@ def build_exth(metadata, prefer_author_sort=False, is_periodical=False,
|
|||
exth.write(ppd)
|
||||
nrecs += 1
|
||||
|
||||
exth.write(pack(b'>II', EXTH_CODES['override_kindle_fonts'], len(b'true') + 8))
|
||||
exth.write(b'true')
|
||||
nrecs += 1
|
||||
|
||||
exth = exth.getvalue()
|
||||
trail = len(exth) % 4
|
||||
pad = b'\0' * (4 - trail) # Always pad w/ at least 1 byte
|
||||
|
|
|
|||
Loading…
Reference in a new issue