mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
KF8 Input: Recognize OpenType embedded fonts as well. Fixes #954728 (Private bug)
This commit is contained in:
parent
7873048dbf
commit
7cc30dada3
@ -477,8 +477,9 @@ def read_font_record(data, extent=1040): # {{{
|
|||||||
return ans
|
return ans
|
||||||
|
|
||||||
ans['font_data'] = font_data
|
ans['font_data'] = font_data
|
||||||
ans['ext'] = ('ttf' if font_data[:4] in {b'\0\1\0\0', b'true', b'ttcf'}
|
sig = font_data[:4]
|
||||||
else 'dat')
|
ans['ext'] = ('ttf' if sig in {b'\0\1\0\0', b'true', b'ttcf'}
|
||||||
|
else 'otf' if sig == b'OTTO' else 'dat')
|
||||||
|
|
||||||
return ans
|
return ans
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user