mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -42,6 +42,7 @@ EXTH_CODES = {
|
||||
'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…
x
Reference in New Issue
Block a user